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 SpriteBundles 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.
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
Groundcomponents; when the scene is done spawning, I want to addSpriteBundles 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
InstanceIdWhat 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.