public sealed class EditorToolAttributeMarks a viewport input as a tool the scene pane offers.
As a annotation
- Valid on
- Class
Remarks
Doc 36 § D3. The class implements IViewportInput and needs a parameterless constructor — it is made by the editor and registered as a SceneTool.
[EditorTool("Sculpt", typeof(TerrainComponent))] public sealed class SculptTool : IViewportInput { … }
⚠ Target is what the tool is for, not what it is allowed to touch. A tool with one appears when something of that type is selected and is put away when it is not, which is the whole reason a pane can offer twenty tools without being a wall of twenty buttons. A tool with none is always offered.
⚠ Read by a scan of the assembly that declared it, and only for a plugin or a project script — see CustomInspectorAttribute for why that is bounded rather than the assembly scanning ADR-002 refuses. In-tree code registers a SceneTool directly.
Fields and properties (4)
public string TitleWhat a person reads on the tool strip.
public Type? TargetWhat has to be selected for it to be offered, or for always.
public string IdThe tool's id, or empty to derive one from the title.
public int OrderWhich of two tools comes first on the strip; the lower one.
Methods (2)
public EditorToolAttribute(string title)Marks a viewport input as a tool the scene pane offers.
public EditorToolAttribute(string title, Type target)Names the tool and what it is for, in one.
Used by (1)
- DeclaredContributionsVixen.Editor.App