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

Passing sceneInstance to "Engine.director.getSceneName" does not work it. #3022

Closed
eonarheim opened this issue Apr 14, 2024 Discussed in #3021 · 0 comments · Fixed by #3023
Closed

Passing sceneInstance to "Engine.director.getSceneName" does not work it. #3022

eonarheim opened this issue Apr 14, 2024 Discussed in #3021 · 0 comments · Fixed by #3023
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior

Comments

@eonarheim
Copy link
Member

Discussed in #3021

Originally posted by aruru-weed April 14, 2024
Hi! I was thinking of making a game using TS for the first time, and was excited to find Excalibar.js.

I'm not good at trying to manage Scenes with strings, so I use "game.goToScene(game.director.getSceneName(scene))"
When I tried that, it didn't work.

image

However, I discovered that by running "game.director.getSceneInstance("MapName")" before it, it works fine.

image

Is this nominal? If it's a bug, I'll try my best to send a pull request.

@eonarheim eonarheim added the bug This issue describes undesirable, incorrect, or unexpected behavior label Apr 14, 2024
aruru-weed pushed a commit to aruru-weed/Excalibur that referenced this issue Apr 18, 2024
aruru-weed added a commit to aruru-weed/Excalibur that referenced this issue Apr 18, 2024
eonarheim pushed a commit that referenced this issue Apr 27, 2024
Closes #3022

## Changes:

- Fixed `getSceneName` to use `scene`.

I didn't know how to use `_sceneToInstance` cache, so I replaced it with something simpler.
eonarheim pushed a commit that referenced this issue May 5, 2024
Closes #3022

## Changes:

- Fixed `getSceneName` to use `scene`.

I didn't know how to use `_sceneToInstance` cache, so I replaced it with something simpler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant