I'm trying to make a dictionary in code to store all the info for the weapons in my game, some of which are node reference. For some reason, having a node reference as it's own variable works perfectly, but if I put that exact reference inside a dictionary, all of a sudden it breaks and the reference doesn't work.
This works:
var nodeReference = get_node("node1/node2/TargetNode")
But this doesn't:
var weaponDictionary = {
'nodeReference': get_node("node1/node2/TargetNode"),
}
When trying to use the dictionary version, it tells me the node path is a null instance.
I've confirmed that the code to refer to the node in the dictionary is working and that I've written the dictionary correctly. It looks to me like it could be a bug, but I don't want to rule out that I've made a mistake somewhere, even if I have NO clue where I might've made one. Does anybody know how I can fix this, or if I can even fix it? Thank you!