Quick answer: Use Godot.Collections.Array<T> instead of T[]. Build the C# project (top-right hammer). For custom element types, the type must be a Godot Resource subclass or a Variant-supported primitive.
You write [Export] public string[] Names;. Inspector doesn’t show the array. C# raw arrays don’t bridge to Godot’s variant system the same way Godot.Collections.Array does.
The Symptom
Class compiles. [Export] is recognized. Inspector renders nothing for the array property. Or shows a generic field instead of an editable array editor.
The Fix
using Godot;
using Godot.Collections;
public partial class EnemyConfig : Node
{
[Export]
public Array<string> Names { get; set; } = new();
[Export]
public Array<PackedScene> SpawnScenes { get; set; } = new();
[Export]
public Array<int> HealthValues { get; set; } = new();
}
Build (Ctrl+B in editor). Inspector now shows the typed array editor with + / - buttons and per-element typed pickers.
Custom Element Types
For arrays of your own classes, the class must extend Resource:
[GlobalClass]
public partial class EnemyDef : Resource
{
[Export] public int Health { get; set; }
[Export] public string DisplayName { get; set; }
}
[Export]
public Array<EnemyDef> Enemies { get; set; } = new();
Inspector shows a typed editor that lets you assign or create new EnemyDef resources inline.
Build Required
Every [Export] change requires a build before the editor sees it. Use the build button (top-right hammer) or Project → Build. If you change a property and the editor doesn’t reflect it, you forgot to build.
Verifying
Build, attach script to a node, view inspector. Typed array editor with + button visible. Add elements and they save into the .tscn.
“Godot.Collections.Array. Build. Inspector renders the editor.”
Related Issues
For C# disposed wrapper, see disposed wrapper. For C# signal listener, see signal listener.
Right collection. Build. Visible.