Get RAPTOR

RaptorSuiteExternalTool

A toolbar tool defined outside the Suite, such as RAPTOR Render's Light tool.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

Works like the built-in toolbar tools. It has one toolbar button below New Block, is exclusive with the Suite's tools, shows its settings in the options row and draws its block in Properties.

public sealed class RaptorSuiteExternalTool

Fields

Activate

public Action Activate;

Turns the tool on.

Deactivate

public Action Deactivate;

Turns the tool off.

DrawOptions

public Func<Rect, float> DrawOptions;

Draws the tool's section of the options row while the tool is active, and returns the width used. The Grid group stays fixed at the right.

DrawPanel

public Action<Rect> DrawPanel;

Optional. While the tool is active, draws the Mesh-mode tool panel (the sidebar right of the toolbar) in place of the Mesh tool's operations. Uses IMGUI with an absolute rect in the toolbar's space.

DrawProperties

public Action<GameObject[]> DrawProperties;

Draws the Inspector block with GUILayout, inside the Inspector's editing scope.

ExclusivePick

public RaptorSuiteExclusivePick ExclusivePick;

Optional. While its RaptorSuiteExclusivePick.Active returns true, this tool handles whole-object picking (click, box, lasso and the Block hover cue) in the 3D view and the Top, Front and Side panes. Null keeps the Suite's picking.

HandleCommand

public Func<string, bool, bool> HandleCommand;

Optional. While the tool is active, Unity edit commands (Delete, SoftDelete, Duplicate, Copy, Cut, Paste) reach it before the Suite. Receives (commandName, execute) and returns true to take the command. On Validate, true means the command would run; on Execute, true means it ran. The Light tool uses this to delete its selected light, because the Suite does not delete service-owned objects.

HidesSection

public Func<Component[], bool> HidesSection;

Optional. Returns true to hide a component section the block replaces (for example the light component's inspector).

IconGlyph

public string IconGlyph;

An icon name from Icons/Raptor/icons.json (e.g. "tool-light").

Id

public string Id;

Stable id (e.g. "raptor.light").

IsActive

public Func<bool> IsActive;

Returns true while the tool is on.

KeepsSuiteView

public Func<bool> KeepsSuiteView;

Optional. While the tool is active and this returns true, the Suite's 3D pass (hover, pick, gizmo, box select) keeps running under the tool. The tool still receives every event first (beforeSceneGui). When this is set, even if it returns false, the Suite's gizmo hotkeys (E, R, Q, Insert) change the gizmo without deactivating the tool.

Name

public string Name;

The tool name, shown as the toolbar tooltip ("Light"). The tooltip also shows the current binding when ShortcutId is set.

OwnsSelection

public Func<GameObject[], bool> OwnsSelection;

Returns whether this tool draws a Inspector block for the selection, even when the tool is not active.

PaneGUI

public Action<RaptorSuitePane> PaneGUI;

Optional. While the tool is active in Mesh mode, receives every event of each Top, Front and Side pane before the Suite's Mesh tool. RaptorSuitePane provides the rect, orthographic camera and pane ray, and Handles draw with the pane's camera. Call Use() on an event to stop it reaching the Mesh tool and the pane. Drag events reach every tool that sets this.

RailOrder

public int RailOrder;

Toolbar position after Select and Block. Lower comes first; equal values keep registration order. RAPTOR's tools use 100 (Prop), 200 (Light) and 500 (Measure).

ShortcutId

public string ShortcutId;

Shortcut Manager id, or null. Without a binding, the tooltip shows only the tool name.

Unranked

public const int Unranked;

The RailOrder of a tool that sets none. Tools with this value follow all ranked tools in registration order.