+1 vote

When is changing a scene with the command get_tree().change_scene(Scene) is mandatory kill the current scene with command currentScene.queue_free()? Or is an operation unnecessary?
Thx
-j

in Engine by (1,469 points)

1 Answer

+2 votes
Best answer

No you don't need to delete the old scene when using change_scene or change_scene_to. They will automatically delete the old scene.

by (672 points)
selected by

Indeed, as evidenced by scene/main/scene_main_loop.cpp:1187

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.