Skip to content

Scene prefab #10949

@djeedai

Description

@djeedai

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

Ability to use Scene as a prefab, in the sense given by Unity: one-way irreversible spawning of a group of entities and components.

What solution would you like?

No SceneBundle, no SceneInstance, no SceenSpawner. Just a way to spawn the content of a scene anywhere (including at the World root, without a common parent entity, so ability to spawn multiple top-level entities as a flat list) and forget forever that this ever was a Scene.

What alternative(s) have you considered?

  • SceneBundle. This has all the mentioned extra "features" which are just getting in the way most of the time for typical "use a prefab to spawn multiple things" usage. This is also missing some features like spawning without a single comment parent entity.
  • Spawning function. This only works if you hardcode the collection of entities and components, and is hard to work with (spawning via code is tedious).

Additional context

Possibly related to #3877, #10907

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 possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useX-ControversialThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions