RaptorSuiteInspectorBlocks
Registry of Inspector blocks.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
public static class RaptorSuiteInspectorBlocksProperties
All
public static IReadOnlyList<RaptorSuiteInspectorBlock> All { get; }Gets the selection blocks in registration order. Anchored blocks are in Anchored.
Anchored
public static IReadOnlyList<RaptorSuiteInspectorBlock> Anchored { get; }Gets the blocks anchored to a section (RaptorSuiteInspectorBlock.Section set), in registration order.
HiddenComponentTypes
public static IReadOnlyList<Type> HiddenComponentTypes { get; }Gets the hidden component types in registration order.
Methods
HideComponentType
public static void HideComponentType(Type componentType)Hides the raw component section for componentType and its derived types in the Inspector. Use it when a module draws a custom block for that component. Hiding a type again has no effect. Call from an [InitializeOnLoad] static constructor. Throws ArgumentNullException for null and ArgumentException for a type that is not a Component.
| Parameter | Type | Description |
|---|---|---|
componentType | Type | The component type. |
HidesComponent
public static bool HidesComponent(Component component)Whether the raw section for component is hidden because its type is, or derives from, a hidden type. Returns false for null.
| Parameter | Type | Description |
|---|---|---|
component | Component | The component. |
Returns: True when hidden.
OpenDrawer
public static bool OpenDrawer(string id)Opens the drawer panel id in the open Suite window through RaptorSuiteWindow.OpenDrawer. Use it for a block's "Show in ... drawer" action. Returns false when no Suite window is open or side tabs are off.
| Parameter | Type | Description |
|---|---|---|
id | string | The drawer panel's id. |
Returns: True when it opened.
Register
public static void Register(RaptorSuiteInspectorBlock block)Adds a block, anchored when RaptorSuiteInspectorBlock.Section is set. A block with the same Id replaces the earlier one. A null block or an empty Id is ignored.
| Parameter | Type | Description |
|---|---|---|
block | RaptorSuiteInspectorBlock | The block. |
Call from an [InitializeOnLoad] static constructor on the main thread.
ShowComponentType
public static bool ShowComponentType(Type componentType)Undoes HideComponentType.
| Parameter | Type | Description |
|---|---|---|
componentType | Type | The component type. |
Returns: False when it was not hidden.
Unregister
public static void Unregister(RaptorSuiteInspectorBlock block)Removes a block registered with Register. Does nothing when the block is not registered.
| Parameter | Type | Description |
|---|---|---|
block | RaptorSuiteInspectorBlock | The block. |
Related types
- RaptorSuiteInspectorBlock: One Inspector block.
- RaptorSuiteWindow: The RAPTOR Suite editor window.