Godot Version
v4.3
Question
Hello, I’ve been looking into Godot today and test it for a future project. Not a game per se but an interactive presentation. I was looking into referencing and these seem to break a lot. If I use $“…/Name”, this will break if I rename the node. If I use %Name, this will break if I rename the node.
More over I’m not sure that nodes names are their actual “script_name”, are they? Maybe I’m see it wrong but when connecting signals, the functions seem to have other names.
I also have seen people suggesting to use variables with @onready to then just update a single variable not all mentions in the code, but if a node is rename, this variable still breaks.
I did see a tip to use
@export var your_variable: NodeType
But this is failing. Maybe I’m missing some extra bits of info on how to implement this. And how to use said reference in another node’s script.
So ideally what I would like to have is:
-
Change node name.
-
Script referencing it, still works.
Thanks