-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
A-AssetsLoad files from disk to use for things like images, models, and soundsLoad files from disk to use for things like images, models, and soundsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
Description
What problem does this solve or what need does it fill?
Spawning a scene happens asynchronously and there isn't a pattern I know of to perform a callback when a scene finishes spawning. In my case, my scene contains a bunch of entities with Ground
components; when the scene is done spawning, I want to add SpriteBundle
s to them.
What solution would you like?
Emit an event when a scene has finished spawning, roughly here: https://github.com/bevyengine/bevy/blob/main/crates/bevy_scene/src/scene_spawner.rs#L242
It is desirable that this event includes the InstanceId
What alternative(s) have you considered?
I currently have a workaround where I use a Query<&Ground, Without<Sprite>>
and insert sprites whenever the scene finishes loading. This is no-op after the first time.
Additional context
I have talked this over with @TheRawMeatball & @alice-i-cecile in discord a bit.
Metadata
Metadata
Assignees
Labels
A-AssetsLoad files from disk to use for things like images, models, and soundsLoad files from disk to use for things like images, models, and soundsC-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to use
Type
Projects
Status
Assets-wide Usability