added unload_current_scene
to SceneTree and removed ability for change_scene_to
to continue when provided null
#63665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the bigger half of the change mentioned in #63565 - this introduces a check for
null
onchange_scene_to
(it provides the same error ofERR_CANT_CREATE
as if it were unable to instantiate the PackedScene).In order to provide the same functionality as that code,
unload_current_scene
was added which just nukescurrent_scene
. Based on my working through the code, it seems like that was originally the path ifchange_scene_to
was given a null value.This is my first time interacting with the source code in anything more than a minor capacity, so comments and suggestions are absolutely welcome and encouraged, of course. I wouldn't be surprised if it could use some work to be in line with spec.
Thanks!