RaptorSuitePropertyEdits.ProjectMarkers
Project component types whose objects are edited by a project tool.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
The project registers each type with the owner word shown in the Properties lock message (for example "Prop" in "Prop properties use their dedicated authoring tools"). The lock check runs after the core markers, on each parent, in the order of the object's components. Types match exactly, so a subclass must be registered separately. With entityBodyOwns, an entity's Body block owns the component and no separate section is shown for it.
Each type can be registered once; a repeat returns false. Each change clears the cached owners. Registrations are editor-only and cleared on domain reload, after which registrants run again.
public static class ProjectMarkersProperties
Count
public static int Count { get; }Gets the number of markers.
Version
public static int Version { get; }Gets a counter that increases by one on every change.
Methods
EntityBodyOwns
public static bool EntityBodyOwns(Type marker)Whether an entity's Body block owns components of this registered type.
| Parameter | Type | Description |
|---|---|---|
marker | Type | The component type. |
Returns: True when it does.
IsRegistered
public static bool IsRegistered(Type marker)Whether this type is registered.
| Parameter | Type | Description |
|---|---|---|
marker | Type | The component type. |
Returns: True when registered.
OwnerOf
public static string OwnerOf(Type marker)Returns the owner word of a registered type, or null.
| Parameter | Type | Description |
|---|---|---|
marker | Type | The component type. |
Returns: The word, or null.
Register
public static bool Register(Type marker, string owner, bool entityBodyOwns = false)Adds a marker. Returns false and keeps the existing entry when marker is already registered. Throws for a null type, a type that is not a Component, or a blank owner word.
| Parameter | Type | Default | Description |
|---|---|---|---|
marker | Type | The component type. | |
owner | string | The owner word shown in the lock message. | |
entityBodyOwns | bool | false | Whether an entity's Body block owns this component. |
Returns: False when the type is already registered.
Call from an [InitializeOnLoad] static constructor on the main thread.
Related types
- RaptorSuitePropertyEdits: How the Inspector edits objects.