I have this setup:
Main
|-- Collider
|-- Model
Now, in Main I want to do something like this:
@onready var collider: CollisionShape3D = get_node("/root/Collider")
func _ready():
print(collider)
But I get an error because collider is null.
To circumvent this I'm declaring "collider" as an @export var and manually assigning it in the editor, but is there a way to this just with code, maybe using signals? I tried with the ready() and enter_tree() signals of Collider but it still failed.