Skip to content

Example in bsn! missing comma #24823

Description

@Shatur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-DocsAn addition or correction to our documentationS-Needs-TriageThis issue needs to be labelled

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions