Quick answer: Godot 4 C# [Export] property with [ExportToolButton] not appearing in editor? Tool attributes require [Tool] on the script - add it at class level.

Editor utility script has [ExportToolButton("Regenerate")]. Button doesn't appear in the inspector.

Add [Tool] to class

[Tool]
public partial class Generator : Node { ... }

Without [Tool], the script doesn't run in editor and tool buttons don't display.

Verify with EngineRuntimeContext

In a tool method, check Engine.IsEditorHint(). True = running in editor. The check confirms the [Tool] attribute is active.

Or use [EditorOnly]

Specific attribute for editor-only methods. Slightly different semantics; useful for one-off utilities.

“Editor-time code requires [Tool]. Without it, editor doesn't load the script.”

If your tool button doesn't show, [Tool] is the first thing to check. Document the requirement at the top of every tool script.

Related reading