Array in a Resource is empty when loaded at runtime

Godot Version

4.2.1

Question

I am trying to load a Resource at runtime.
I have a defined class as:

extends Resource
class_name StoryNode

@export var debug : String
@export var locations : Array[String]

Within the editor I defined it as:

However after loading it with a line:

var _story = ResourceLoader.load("res://assets/story/%s.tres" % [story],"StoryNode") as StoryNode

the array ‘Locations’ seems to be empty, but the string ‘Debug’ has the proper value.
This is how the editor shows it during debug:


All members seem to be doubled and the value of ‘Debug’ is fine and of the array is not.
From what debugger shows I would expect either both to be correct, or none.
Did anyone had a problem like this?
What am I doing wrong?

Pretty sure it’s a debugger bug, only look at members for accurate information

1 Like