How can i get the root path of a scene?

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

Hi there.
I wanna to get the path of a scene via code.
I don’t mean something like this:

ExitArea/CollisionShape2D

I mean something like this:

res://Objets/Stages/stage -2.tscn

How can i do that?

:bust_in_silhouette: Reply From: exuin

Get the filenameproperty of the root node of the scene.