Get RAPTOR

RaptorBaker

Bakes a RaptorModel's Blocks in place into a persisted Object/Mesh_N hierarchy (Bake Room).

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

The baked hierarchy sits beside the editable Blocks. Each material gets one single-submesh mesh, saved as a standalone .asset. Re-bakes update these assets in place, so their GUIDs stay stable. Baking is editor-only. At runtime the baked Object is rendered, and the Blocks remain the editable source.

public static class RaptorBaker

Fields

CollisionGrouper

public static System.Func<Material, int> CollisionGrouper;

Maps a material to a collision-surface group. When null, each material is its own group. Materials in the same group share one Collider_g child, so a room gets one collider per surface type rather than per material. The grouping is not part of the geometry hash, so a change takes effect on the next manual re-bake.

One provider at a time. The last assignment wins, and null restores the built-in handler.

DecalsContainerName

public const string DecalsContainerName;

The name of the model's child that holds placed decals.

EmittersContainerName

public const string EmittersContainerName;

The name of the model's child that holds placed emitters.

ObjectContainerName

public const string ObjectContainerName;

The name of the model's child that holds its generated meshes and colliders.

PropsContainerName

public const string PropsContainerName;

The name of the model's child that holds placed props.

Events

AfterBakeInPlace

public static event System.Action<Raptor.Components.RaptorModel, Transform> AfterBakeInPlace;

Raised after a successful BakeInPlace, with the model and its baked "Object" container. Use it, for example, to tag baked colliders. Never raised at runtime.

  • RaptorModel: The root of a RAPTOR model and its output container.