RaptorBakeBackends
The bake backend registry.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, 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 RaptorBakeBackendsFields
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.
| Parameter | Type | Description |
|---|---|---|
id | string | The backend's id. |
Returns: The backend, or null.
Register
public static bool Register(IRaptorBakeBackend backend)Adds a backend after the existing ones.
| Parameter | Type | Description |
|---|---|---|
backend | IRaptorBakeBackend | The 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.
| Parameter | Type | Description |
|---|---|---|
id | string | The backend's id. |
Returns: True if a backend was removed.
Related types
- IRaptorBakeBackend: A bake backend, run from the Render dropdown.