Skip to content

Commit 449f3c5

Browse files
committed
docs
1 parent 6ec1f4d commit 449f3c5

File tree

1 file changed

+8
-1
lines changed
  • crates/bevy_mod_scripting_functions/src

1 file changed

+8
-1
lines changed

crates/bevy_mod_scripting_functions/src/core.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,16 @@ impl World {
447447
}
448448

449449
/// Registers a new component type with the world.
450+
///
451+
/// The component will behave like any other native component for all intents and purposes.
452+
/// The type that will be instantiated to back this component will be `ScriptComponent` which contains two fields:
453+
/// - `data`
454+
///
455+
/// This field can be set to any value and modified freely.
456+
///
450457
/// Arguments:
451458
/// * `ctxt`: The function call context.
452-
/// * `name`: The name of the component type.
459+
/// * `name`: The name of the component type. The name MUST begin with `Script` or an error will be thrown
453460
/// Returns:
454461
/// * `registration`: The registration of the new component type if successful.
455462
fn register_new_component(

0 commit comments

Comments
 (0)