Quick answer: The class must be declared partial. Build the C# project (Build button in editor) after each script change. Use [Export] on fields or auto-properties; for ranges use [Export(PropertyHint.Range, "0,100")].
Here is how to fix Godot 4 C# [Export] attributes that compile but never appear in the Inspector. Three things must align: partial class, successful build, and supported property type.
The Symptom
Add [Export] to a field. Build succeeds. Open the scene; the property does not appear in Inspector. Other exports on the same script may still show.
What Causes This
Class not partial. Godot generates partial code that combines with yours; non-partial classes do not get the metadata.
Project not built. Inspector reads compiled metadata, not source. Without a build, new exports are invisible.
Unsupported type. Generic Lists need specific syntax; some custom types need [GlobalClass] or wrappers.
The Fix
Step 1: Mark class partial.
using Godot;
public partial class Player : CharacterBody3D
{
[Export] public float Speed { get; set; } = 5f;
[Export(PropertyHint.Range, "0,100,1")] public int Health = 100;
[Export] public Texture2D Icon;
}
Step 2: Build the C# project. Click the Build hammer icon in the Godot editor. Or run dotnet build from terminal in the project folder. After build, Inspector refreshes.
Step 3: Use ExportCategory and ExportSubgroup for organization.
[ExportCategory("Movement")]
[Export] public float WalkSpeed = 5f;
[Export] public float RunSpeed = 10f;
[ExportCategory("Combat")]
[Export] public int AttackPower = 10;
Step 4: For arrays/lists, use Godot.Collections.
using Godot.Collections;
[Export] public Array<Resource> Items;
[Export] public Dictionary<string, int> Counters;
Godot.Collections types serialize through the engine; System.Collections.Generic versions may not.
Step 5: Reload Project after major refactors. Project → Reload Current Project to refresh metadata. Combined with Build, restores Inspector to a clean state.
“partial. Build. Right collection types. Inspector shows it all.”
Related Issues
For C# signal disconnect, see C# Signal Disconnect. For C# disposed errors, see GodotObject Disposed.
partial class. Build C# project. Godot.Collections for arrays. Exports appear.