RaptorSuitePropertyEdits.OwnerOverrides
Objects that edit themselves, so the Inspector leaves them to their owner.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
public static class OwnerOverridesProperties
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.
| Parameter | Type | Description |
|---|---|---|
id | string | The 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | The override's stable id. | |
editsItself | Func<GameObject, bool> | Returns true when the object edits itself. | |
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 test that throws is logged and the remaining tests still run.
Related types
- RaptorSuitePropertyEdits: How the Inspector edits objects.