RaptorSuiteGizmoTargets.Provider
One kind of module object and the callbacks RAPTOR uses for it.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
A callback that throws is logged once, and the provider is treated as not owning the object.
public sealed class ProviderFields
AfterCopy
public Action<GameObject[], GameObject> AfterCopy;Called after a Duplicate, Paste, Shift-drag copy or Duplicate as variant, inside its Undo group. Receives the copies and the source, or null when there is no single source.
AfterMove
public Action<IList<GameObject>> AfterMove;Called after a Hierarchy move, inside its Undo group, with the moved objects.
AllowScale
public bool AllowScale;Whether the Scale gizmo can act on the kind's objects. Defaults to false, which allows Move, Rotate and Set pivot only.
Bounds
public Func<Transform, Bounds?> Bounds;Gets an owned object's world bounds, used for the gizmo pivot and the frame tools. Returns null when the object has no bounds.
Colours
public KindColours? Colours;The Hierarchy colour of owned objects (Owns) in both palettes. When null, the default rules apply.
DrawPane
public Action<Camera> DrawPane;Draws the kind's object marks in a camera-hosted pane on Repaint.
EditsItself
public Func<GameObject, bool> EditsItself;Whether an object's properties can be edited directly, without the container ownership lock. When null, Owns is used.
Icon
public Func<GameObject, string> Icon;Gets the Hierarchy row glyph of an owned object. Returns null when the object is not this kind's.
Id
public string Id;The unique id. Registering another provider with the same id replaces this one.
InsideVolume
public Func<Ray, GameObject> InsideVolume;Gets an owned object whose volume contains the ray's origin, or null. Asked last, when a 3D click hits nothing.
MovesFreely
public Func<GameObject, bool> MovesFreely;Whether a Hierarchy drag can move the object anywhere a drop allows, including in or out of a model's containers.
Order
public int Order;The kind's position in every lookup chain. Lower runs first; ties keep registration order. Defaults to 0.
Owns
public Func<GameObject, bool> Owns;Whether this provider owns an object. An owned object is the root that the gizmo moves.
OwnsRowDrag
public Func<GameObject, bool> OwnsRowDrag;Whether the provider handles the row's drag. When true, the Hierarchy does not start its move drag.
PaneMarksFromScene
public bool PaneMarksFromScene;Whether DrawPane draws from scene state only: the selection, transforms and the objects' saved values. When true, RAPTOR can reuse a pane's last drawing until the scene changes. Defaults to false, which redraws panes live.
PaneUnder
public Func<Vector2, GameObject> PaneUnder;Gets the owned object under a GUI point of a camera-hosted Top, Front or Side pane, or null.
PasteReceives
public Func<Transform, GameObject, bool> PasteReceives;Whether a paste can go back under parent, its remembered parent, even when the parent's lock refuses other objects.
RefusesAsTarget
public Func<Transform, bool> RefusesAsTarget;Whether Hierarchy drops onto this transform are refused. Use it for objects that hold no children of other kinds.
RegionSelect
public Action<Rect, Vector2[], List<GameObject>> RegionSelect;Handles box and lasso selection. Receives the GUI rect, the lasso polygon (null for a box) and a list, and adds the owned objects wholly inside to the list.
ResolvePick
public Func<GameObject, GameObject> ResolvePick;Resolves a Unity pick on one of the kind's renderers to the owned object to select, or null.
RowEvent
public Func<Event, Rect, GameObject, float, float, bool> RowEvent;Handles a Hierarchy row event. Receives the event, the row rect, the object, and the name's minimum and maximum x. Returns true when it used the event, which stops the row's own handling.
RowMenu
public Action<RaptorSuiteControls.Menu, GameObject> RowMenu;Adds row menu items for an object, after "Show in Unity Hierarchy".
RowTooltip
public Func<GameObject, string> RowTooltip;Gets the Hierarchy row tooltip of an owned object. Returns null when the object is not this kind's.
ScaleSize
public ScaleSizeStep ScaleSize;One step of a Scale drag on an object ScalesSize took: the object's own size takes the scale, and its position and transform scale stay.
ScalesSize
public Func<GameObject, bool> ScalesSize;An owned object the Scale gizmo resizes through ScaleSize instead of its transform's scale. Optional, and asked only when AllowScale is false. Both members must be set.
SceneRootName
public string SceneRootName;The name of the root scene object that holds the kind's loose objects.
TakesEditCommands
public bool TakesEditCommands;Whether a selection made only of this kind's objects sends the Suite's object edit commands, such as Delete and Duplicate, to the provider. Defaults to true. When false, the Mesh tool handles the selection as it does for other objects.
UnderPointer
public Func<Vector2, GameObject> UnderPointer;Optional. Gets the owned object shown under a GUI point of the 3D view (its mark or wire), or null.
Related types
- RaptorSuiteControls.Menu: A grouped Suite menu built on RaptorSuiteMenu.Builder, with a header per group and separators between groups.
- RaptorSuiteGizmoTargets: Lets a module's object kinds act like RAPTOR objects: gizmos, picking, Hierarchy rows, copy and paste.