Get RAPTOR

RaptorSuiteRegistry

Registers Suite panels from any editor assembly, including Assembly-CSharp-Editor.

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

Properties

Diagnostics

public static IReadOnlyList<string> Diagnostics { get; }

The reasons registrations were refused, one per line.

Panels

public static IReadOnlyList<RaptorSuitePanelDescriptor> Panels { get; }

Every registered panel.

Methods

Register

public static bool Register(RaptorSuitePanelDescriptor descriptor)

Adds a panel. Throws on a null descriptor. Registering the same descriptor again returns true. A different descriptor with an id that is already taken is refused, and the existing panel is kept.

ParameterTypeDescription
descriptorRaptorSuitePanelDescriptorThe panel.

Returns: False when refused. The reason is added to Diagnostics.

Call from an [InitializeOnLoad] static constructor on the main thread.

Unregister

public static bool Unregister(string id, RaptorSuitePanelDescriptor descriptor)

Removes a panel. The panel is removed only when descriptor is the one registered under id.

ParameterTypeDescription
idstringThe panel's stable id.
descriptorRaptorSuitePanelDescriptorThe registered descriptor.

Returns: True when it was removed.

Events

Changed

public static event Action Changed;

Raised when a panel is added or removed.