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
don't trigger onExitTransitionDidStart #6681
Conversation
It does not fix the bug with twice calling onExit(). |
@zifter About |
[ci skip] don't trigger onExitTransitionDidStart
@zifter |
Thanks. |
@@ -925,7 +926,6 @@ void Director::purgeDirector() | |||
|
|||
if (_runningScene) | |||
{ | |||
_runningScene->onExitTransitionDidStart(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying to understand why this line was removed. It doesn't make much sense to me because onExit will be called without onExistTransitionDidStart being called before it.
I do understand that the other changes were made because onExitTransitionDidStart was called twice, but when purging the director it seems impossible for it to happen, am I right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Methods onExitTransitionDidStart and onEnterTransitionDidFinish must be called only of
Calls to methods onExitTransitionDidStart and onEnterTransitionDidFinish should be only if the transition occurs with the TransitionScene, is't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can understand what you are saying, but let's imagine my game is made in a way that most cleanup is made in onExitTransitionDidStart and not on onExit, because I replace scenes using a TransitionScene and I don't want to generate any conflicts between the two scenes. (imagine my nodes use platform-specific services like Text-to-speech, audio recording, etc).
This way, if I purge the director, my onExitTransitionDidStart methods will not be called and I will end up with resources that were not properly cleaned.
Of course I could move all that logic to onEnter/onExit instead of onExitTransitionDidStart/onEnterTransitionDidFinish but it just doesn't seem natural.
No description provided.