RaptorSuiteViewportOverlays
Registers overlays that draw in the Suite's 3D pass.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
public static class RaptorSuiteViewportOverlaysFields
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).
| Parameter | Type | Description |
|---|---|---|
view | SceneView | The 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.
| Parameter | Type | Description |
|---|---|---|
phase | Phase | The phase. |
Returns: The ids.
IsRegistered
public static bool IsRegistered(string id)Whether an overlay with this id is registered.
| Parameter | Type | Description |
|---|---|---|
id | string | The 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).
| Parameter | Type | Description |
|---|---|---|
view | SceneView | The 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | The overlay's stable id. | |
phase | Phase | When it draws. | |
draw | Action<SceneView> | Draws the overlay. | |
order | int | 0 | Lower 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | The overlay's stable id. | |
phase | Phase | When it draws. | |
draw | Overlay | Draws the overlay. | |
order | int | 0 | Lower 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.
| Parameter | Type | Description |
|---|---|---|
id | string | The overlay's stable id. |
phase | out Phase | The overlay's phase. |
Returns: False when the id is not registered.
Related types
- RaptorSuiteViewportOverlays.Overlay: Draws an overlay in the Suite's 3D pass.
- RaptorSuiteViewportOverlays.Phase: When an overlay draws in the Suite's 3D pass.