-
-
Notifications
You must be signed in to change notification settings - Fork 250
Fix to ensure Component::onEnter() is called #867
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
Conversation
|
maybe remove the for reference: portion should be removed. |
That code should not be removed, since it is still required. Review the code carefully and you will see why. The Also, if the That's why the code is correct and should not be removed at all. |
|
I see.. |
|
Maybe a test (cpp-test) with different scenarios will be usefull too? |
I don't see any way to test this, as the side effect of the original code is that The sub-classes that inherit from |
Describe your changes
If a component is added to a parent node after the parent
Node::onEnter()has been called, then theComponent::onEnter()would never be called.This fix ensures that if the component is added while the parent node is already running, then the
Component::onEnter()is called.Issue ticket number and link
#866
Checklist before requesting a review