Topic was automatically imported from the old Question2Answer platform.
Asked By
Repertix
When using:
var weapon = load("res://weapon.tscn")
var w = weapon.instance()
get_tree().get_root().get_node("Level/Player").call_deferred("add_child", w)
The game adds the node with weird version of the original name, instead of “weapon”, imports it by “@weapon@8” and cause error due to some get_node() functions
When I try to use
get_node("Level/Player/@weapon@8")
in the previous function, it imports it with the name of “weapon” for some reason. There’s a way to fix this? Thanks in advance.