Godot Version
v4.5.dev1.official [97241ffea]
Question
I have a @tool script that adds a Room
node reference to an exit
resource when I click a button:
@tool
class_name Exit extends Resource
var current_room: Room :
set(room_to_set):
current_room = room_to_set
This resource exists in the exits
dictionary in another Room
node.
@tool
class_name Room extends Node
@export var exits: Dictionary[Types.ExitDirs, Exit] = {}
The Room
node reference is successfully set, as tested with print. However, when the game is running, it reverts to <null>
. Is there something about tool scripts that I’m missing?