RaptorEntityBodies
Entity Body options and their switching.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Only Option and the Switched event are supported API. Built-in body orders are 100 apart, leaving room for other bodies between them.
public static class RaptorEntityBodiesFields
BreakableOrder
public const int BreakableOrder;The order of the built-in Breakable body (400).
DynamicOrder
public const int DynamicOrder;The order of the built-in Dynamic body (100).
MovingOrder
public const int MovingOrder;The order of the built-in Moving body (200).
PhysicsOrder
public const int PhysicsOrder;The order of the built-in Physics body (300).
StaticOrder
public const int StaticOrder;The order of the built-in Static body (0).
Properties
Options
public static Option[] Options { get; }Gets every offered body in Option.Order, one option per body from the winning provider. Computed from RaptorEntityBodyProviders and cached until a provider registers or is removed; until then the same instances are returned.
Events
Switched
public static event Action<IReadOnlyList<GameObject>, RaptorEntityBody> Switched;Raised once after a switch that changed at least one entity, after the switch's Undo group closes. Passes the changed roots and the new body. Not raised when the switch is refused or every entity already had the body. A handler that throws is logged and the others still run.
Related types
- RaptorEntityBodies.Option: One Body option: its label, icon, availability and switching steps.
- RaptorEntityBodyProviders: The priority registry of entity body providers.