Get RAPTOR

RaptorBakeBackends

The bake backend registry.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

Backends register when the editor loads; RaptorRender registers Bakery. Auto is the first available backend in registration order, otherwise None ("No baker"). A second Register with the same id is refused, so entering Play mode without a domain reload is safe.

public static class RaptorBakeBackends

Fields

BakeryId

public const string BakeryId;

The Bakery backend's id. RaptorRender registers this backend.

NoneId

public const string NoneId;

The id of the fallback used when the project has no baker.

Properties

Active

public static IRaptorBakeBackend Active { get; }

The backend the Render dropdown runs, and the one RAPTOR reads Running and Progress from. This is TestOverride if set, otherwise Auto. Never null.

All

public static IReadOnlyList<IRaptorBakeBackend> All { get; }

Every registered backend in registration order, excluding None.

Auto

public static IRaptorBakeBackend Auto { get; }

The first registered backend that is available in this project, otherwise None.

None

public static IRaptorBakeBackend None { get; }

The "No baker" fallback. It is never available and bakes nothing.

Methods

Get

public static IRaptorBakeBackend Get(string id)

Returns the registered backend with this id, or null. For NoneId, returns None.

ParameterTypeDescription
idstringThe backend's id.

Returns: The backend, or null.

Register

public static bool Register(IRaptorBakeBackend backend)

Adds a backend after the existing ones.

ParameterTypeDescription
backendIRaptorBakeBackendThe backend.

Returns: False when the id is taken; the existing backend is kept.

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

Unregister

public static bool Unregister(string id)

Removes a registered backend. Clears TestOverride if it was that backend.

ParameterTypeDescription
idstringThe backend's id.

Returns: True if a backend was removed.