File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
crates/bevy_mod_scripting_functions/src Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -447,9 +447,16 @@ impl World {
447
447
}
448
448
449
449
/// 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
+ ///
450
457
/// Arguments:
451
458
/// * `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
453
460
/// Returns:
454
461
/// * `registration`: The registration of the new component type if successful.
455
462
fn register_new_component (
You can’t perform that action at this time.
0 commit comments