Get RAPTOR

RaptorSuitePropertyEdits.OwnerOverrides

Objects that edit themselves, so the Inspector leaves them to their owner.

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

Properties

Count

public static int Count { get; }

Gets the number of overrides.

Ids

public static IReadOnlyList<string> Ids { get; }

Gets a snapshot of every override id in the order the tests run.

Version

public static int Version { get; }

Gets a counter that increases by one on every change.

Methods

IsRegistered

public static bool IsRegistered(string id)

Whether an override with this id is registered.

ParameterTypeDescription
idstringThe override's stable id.

Returns: True when registered.

Register

public static bool Register(string id, Func<GameObject, bool> editsItself, int order = 0)

Adds an override. Returns false and keeps the existing one when id is already registered. Throws for a blank id or a null test.

ParameterTypeDefaultDescription
idstringThe override's stable id.
editsItselfFunc<GameObject, bool>Returns true when the object edits itself.
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 test that throws is logged and the remaining tests still run.