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

Change scene with PackedScene instead of string #17

Closed
myin142 opened this issue Jul 17, 2022 · 2 comments · Fixed by #19
Closed

Change scene with PackedScene instead of string #17

myin142 opened this issue Jul 17, 2022 · 2 comments · Fixed by #19
Assignees
Labels
enhancement New feature or request

Comments

@myin142
Copy link
Contributor

myin142 commented Jul 17, 2022

Is your feature request related to a problem? Please describe.
I usually don't like to call the get_tree().change_scene() method because it takes a string. If I ever move or rename the scene I have to find all usages of it and do the same. That's why I always use get_tree().change_scene_to() with a PackedScene. That way it will always be automatically updated whenever I change the path of the scene.

Describe the solution you'd like
Currently only the change_scene() is possible with this plugin. I would be nice if we also have the other option available

@jabsatz jabsatz added the enhancement New feature or request label Jul 18, 2022
@jabsatz jabsatz self-assigned this Jul 18, 2022
@jabsatz
Copy link
Collaborator

jabsatz commented Jul 18, 2022

This is definitely a valid use case. I'll work on it when I have some time, or if you want to implement a solution you're free to open a pull request.

@jabsatz
Copy link
Collaborator

jabsatz commented Jul 18, 2022

To be clear, the solution I have in mind is to make SceneManager.change_scene() take either a String or a PackedScene as a parameter, not to make a whole new method, in order to keep the API as small as possible

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 a pull request may close this issue.

2 participants