Skip to content

Conversation

@rh101
Copy link
Contributor

@rh101 rh101 commented Sep 24, 2025

Describe your changes

This PR addresses the issue described in issue #2798, where the return value of Director::getRunningScene() is not consistent between instant scene switches and transitions if called in onEnter() of the new (incoming) scene.

The value of getRunningScene() when called from onEnter() will now always be the new scene.

The value of getRunningScene() when called from onExit() will now also be the new scene.

Issue ticket number and link

#2798

Checklist before requesting a review

For each PR

  • Add Copyright if it missed:
    - "Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."

  • I have performed a self-review of my code.

    Optional:

    • I have checked readme and add important infos to this PR.
    • I have added/adapted some tests too.

For core/new feature PR

  • I have checked readme and add important infos to this PR.
  • I have added thorough tests.

Axmol 3.x ------------------------------------------------------------

For each 3.x PR

  • Check the '#include "axmol.h"' and replace it with the needed headers.

@halx99 halx99 changed the base branch from dev to release/2.x September 24, 2025 09:49
@halx99
Copy link
Collaborator

halx99 commented Sep 24, 2025

Wrong target branch I guess, so I switch to release/2.x

@halx99 halx99 added this to the 2.9.0 milestone Sep 24, 2025
@halx99 halx99 added the enhancement New feature or request label Sep 24, 2025
@rh101
Copy link
Contributor Author

rh101 commented Sep 24, 2025

Wrong target branch I guess, so I switch to release/2.x

Sorry, yes, it should have been release/2.x. Thank you for fixing it

@halx99 halx99 merged commit cc27a31 into axmolengine:release/2.x Sep 24, 2025
1 check passed
@rh101 rh101 deleted the running-scene-change branch September 24, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discrepancy between instance scene switches and transitions when calling Director::getRunningScene()

2 participants