Get RAPTOR

RaptorSuiteViewportOverlays

Registers overlays that draw in the Suite's 3D pass.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0
public static class RaptorSuiteViewportOverlays

Fields

RealLook

public static Func<SceneView, bool> RealLook;

Decides whether a view shows Special tool materials as they look in game. Holds one provider, and the last assignment wins. When null, no view shows the in-game look. A provider that throws is logged and removed.

Suppress

public static Func<SceneView, bool> Suppress;

Decides whether the Suite's overlays are hidden in a view. Set by the feature that owns the view, such as the Ray-traced preview. Holds one provider, and the last assignment wins. When null, overlays are not hidden. A provider that throws is logged and removed.

Properties

OverlaysVersion

public static int OverlaysVersion { get; }

Incremented on every change.

Methods

Hidden

public static bool Hidden(SceneView view)

Whether the Suite's overlays are hidden in this view (see Suppress).

ParameterTypeDescription
viewSceneViewThe 3D view.

Returns: True when hidden.

Ids

public static IReadOnlyList<string> Ids(Phase phase)

Gets a snapshot of one phase's overlay ids, in drawing order.

ParameterTypeDescription
phasePhaseThe phase.

Returns: The ids.

IsRegistered

public static bool IsRegistered(string id)

Whether an overlay with this id is registered.

ParameterTypeDescription
idstringThe overlay's stable id.

Returns: True when registered.

RealLookIn

public static bool RealLookIn(SceneView view)

Whether this view shows the in-game look (see RealLook).

ParameterTypeDescription
viewSceneViewThe 3D view.

Returns: True when it does.

Register

public static bool Register(string id, Phase phase, Action<SceneView> draw, int order = 0)

Registers an overlay that needs only the view. Otherwise the same as the other overload.

ParameterTypeDefaultDescription
idstringThe overlay's stable id.
phasePhaseWhen it draws.
drawAction<SceneView>Draws the overlay.
orderint0Lower runs first; ties keep registration order.

Returns: False when the id is taken.

Call from an [InitializeOnLoad] static constructor on the main thread. A callback that throws is logged and does not stop the others.

Register

public static bool Register(string id, Phase phase, Overlay draw, int order = 0)

Registers an overlay in phase. Within a phase, overlays draw by order, then in registration order. The first registration of an id wins; a repeat returns false and changes nothing. Throws ArgumentException for a blank id and ArgumentNullException for a null draw. Registrations are editor-only and a domain reload clears them.

ParameterTypeDefaultDescription
idstringThe overlay's stable id.
phasePhaseWhen it draws.
drawOverlayDraws the overlay.
orderint0Lower runs first; ties keep registration order.

Returns: False when the id is taken.

Call from an [InitializeOnLoad] static constructor on the main thread. A callback that throws is logged and does not stop the others.

TryGetPhase

public static bool TryGetPhase(string id, out Phase phase)

Gets the phase an overlay draws in.

ParameterTypeDescription
idstringThe overlay's stable id.
phaseout PhaseThe overlay's phase.

Returns: False when the id is not registered.