How can Bevy's documentation be improved?
Looks the example missing a comma after Node and ComponentB:
|
/// Children [ // spawning multiple related entities using a RelationshipTarget component |
|
/// #Child1 ComponentA, // entities are comma-separated |
|
/// (other_scene() #Child3), // parentheses around a single entity are optional for clarity |
|
/// Link(#SomeName), // passing a entity reference to a component as `Entity`, component has to implement FromTemplate |
|
/// @MySceneComponent { // components which derive SceneComponent have scenes and can be inherited from |
|
/// @some_prop: 3, // props, look like fields prefixed with @ but end up passed to the components scene as arguments |
|
/// normal_field: 5 // while normal fields are the actual fields of the component |
|
/// }, |
|
/// Node { |
|
/// width: some_var // variables can be assigned to field values |
|
/// } |
|
/// ComponentB({some_variable + 3.}) // values can be expressions, when wrapped in {} |
They're located inside children, so we either should take them in braces to make it clear that it's a single entity, or put commas after components to make them different entities.
How can Bevy's documentation be improved?
Looks the example missing a comma after
NodeandComponentB:bevy/crates/bevy_scene/macros/src/lib.rs
Lines 23 to 34 in 5558f7b
They're located inside children, so we either should take them in braces to make it clear that it's a single entity, or put commas after components to make them different entities.