Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncSceneInheritOutline to use SceneInstanceReady / be reversible #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

komadori
Copy link
Owner

This attempts to address:


// Handles scenes which become ready after `AsyncSceneInheritOutline` is added.
#[allow(clippy::type_complexity)]
fn async_ready_event(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need both systems? Isn't SceneInstanceReady emitted every time after an instance spawn?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This supports the use case that you first spawn a scene, the scene becomes ready, and then only later add the outlining components to it.

Personally, I always add the outline components at spawning time and never remove them, but I can't say that an approach where you add and remove the components is wrong. I don't know how efficient the Added query filter is though, so perhaps this is no better than not using the event.

Copy link
Contributor

@Shatur Shatur Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

Regardless complexity see this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants