Send SceneInstanceReady when spawning any kind of scene#11741
Merged
mockersf merged 1 commit intobevyengine:mainfrom Jul 6, 2024
Merged
Send SceneInstanceReady when spawning any kind of scene#11741mockersf merged 1 commit intobevyengine:mainfrom
SceneInstanceReady when spawning any kind of scene#11741mockersf merged 1 commit intobevyengine:mainfrom
Conversation
alice-i-cecile
approved these changes
Feb 6, 2024
Contributor
|
This seems like a nice way to handle this 🙌 It doesnt seem like it would break the ways i use the event. I am now using this event to detect when a GLTF scene is fully attached to an entity [with a specific component] . i loop through the child nodes and act upon them by name. Such as registering the child to an entity linker , swapping the materials, or replacing the child mesh with a xpbd collider. This functionality is critical to multiple parts of my game. It effectively lets me name nodes in blender to give them super powers in bevy. This change seems like it will not break that flow while also addressing the issue 2218 |
00cf571 to
0013fa2
Compare
torsteingrindvik
approved these changes
Jul 5, 2024
Contributor
torsteingrindvik
left a comment
There was a problem hiding this comment.
Code reads well- the tests really help build confidence here.
0013fa2 to
d4c6966
Compare
mockersf
approved these changes
Jul 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
SceneandDynamicScene).InstanceIdalong.Follow-up to #11002.
Fixes #2218.
Solution
SceneInstanceReadyregardless of scene type.SceneInstanceReady::parentOptional.SceneInstanceReady::id.Changelog
Changed
SceneInstanceReadyis now sent forSceneas well.SceneInstanceReady::parentis anOptionandSceneInstanceReady::id, anInstanceId, is added to identify the correspondingScene.Migration Guide
SceneInstanceReady { parent: Entity }is nowSceneInstanceReady { id: InstanceId, parent: Option<Entity> }.