instance scene name

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ramazan

instance the bullet scene. How do I find out which scene is sampling the bullet.
get_tree().current_scene.add_child(bullet)
Note: print(path.name) = current scene
So how do I find the sampler? (scene doing “instance”)
Sorry english is not my native language

:bust_in_silhouette: Reply From: sporx13

Before instancing you can get name by calling:

get_tree().get_current_scene().get_name()

Or if u want path:

get_tree().get_current_scene().get_path()

for bullet : “Which scene instance me”
sorry i use “google translate”

ramazan | 2022-01-10 04:59