I'm instancing button during runtime, and want to set their focus neighbors through code.
The return button here should focus itself when seeking its top neighbor.
for button in popup_box.get_children():
if button.get_index() == 0:
button.focus_neighbor_top = NodePath("%PopupReturnButton")
Godot keeps throwing me errors that the Node Path is invalid.
_get_focus_neighbor: Neighbor focus node path is invalid: '%PopupReturnButton'.
It does work when i type out the complete path like this: NodePath("../../../%PopupReturnButton")
Seems pointless to have a unique name thoguh, when you gotta type it out all the way anyway...
Is there a better way to set focus neighbors via script?