This repository has been archived on 2025-01-17. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
blood-and-mortar/addons/godot_state_charts/debug_util.gd

8 lines
283 B
GDScript

## Returns the path of a node in the scene tree
## Returns the name of the node if the node is not in the tree.
static func path_of(node: Node) -> String:
if node == null:
return ""
if !node.is_inside_tree():
return node.name + " (not in tree)"
return str(node.get_path())