Quick answer: Initialize the array per-instance with new() in the property declaration. Use Godot.Collections.Array<T>. Each scene instance gets its own fresh collection.
You set up a list of enemy defs in the editor. Instance the scene at runtime — new instance shows empty array. The default isn’t carried over because the property isn’t serialized correctly per-instance.
The Symptom
Editor scene shows the array populated. Instanced copies (or saved sub-scene) start empty.
The Fix
using Godot;
using Godot.Collections;
public partial class Wave : Node
{
[Export]
public Array<EnemyDef> Enemies { get; set; } = new();
}
Property initializer runs per-instance, providing a fresh Array. Editor edits to a placed instance serialize as overrides on that instance only.
Don’t Share Defaults
// Bad — shared static reference
private static readonly Array<EnemyDef> _default = new();
[Export] public Array<EnemyDef> Enemies { get; set; } = _default;
Every instance shares the same Array. Edit in one place; affects all.
Verifying
Edit the property on a scene’s root. Save. Instance the scene 5x at runtime. Each instance should show the saved value but be independently editable.
“Initialize per-instance. Godot.Collections.Array. Each scene gets its own.”
Related Issues
For C# Export Array inspector, see Export Array. For C# Resource references, see references.
new() per instance. Independent arrays.