0 votes

i'm using a referenced scene with a script that is requesting the scene name via get_tree().current_scene.name but it is just returning with Node2D.

Im on version 3.3.2 stable and the script is in the root node of the referenced screen if it makes a difference

Godot version 3.3.2 stable
in Engine by (12 points)

1 Answer

0 votes

Try this

print(get_tree().current_scene.get_name())
by (18 points)

i currently have it set to a keybind.
it returns Node2D as the only output

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 [email protected] with your username.