Skip to content

Add an abstraction like bundles that can define child entities as well #2565

@ricardoalcantara

Description

@ricardoalcantara

What problem does this solve or what need does it fill?

It's just a syntax sugar for better entity code organization

What solution would you like?

#[derive(Bundle)]
pub struct PlayerBundle {
    player: Player,
    movement: Movement,
    transform: Transform,
    global_transform: GlobalTransform,
    
    #[child]
    sprite: SpriteSheetBundle,
}

What alternative(s) have you considered?

I can already spawn two entities and parent them together, but I would be easier to spawn an entity and alto spawn it's children.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsA-ScenesSerialized ECS data stored on the diskC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Needs-Design-DocThis issue or PR is particularly complex, and needs an approved design doc before it can be merged

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions