MatterBakeCache#
Process-wide cache of Matter bakes (structures and fracture pieces), keyed by content: mesh geometry, scale, seed, weakness and resolution/piece count. Identical placements share one bake — and therefore one set of piece meshes, render bindings and physics shapes — the way older engines shipped a few fracture patterns per asset rather than one per instance. Thread-safe; debris bakes run on worker threads.
public static class MatterBakeCacheMembers: Fracture · Report · Resolve · Structure
Fracture#
public static MatterFracture Fracture(MeshAsset mesh, MatterStructure structure, Vector3 scale, int seed, float weakness, int resolution, int pieces, MatterFracturePattern pattern = MatterFracturePattern.Voronoi);Pre-baked pieces over structure (from Structure with the same arguments).
Report#
public static string Report();Resolve#
public static (MatterStructure Structure, MatterFracture? Fracture) Resolve(MeshAsset mesh, MatterBake bake);The structure and (when MatterBake.Pieces ≥ 2 and the mesh can be cut) fracture for a bake.
Structure#
public static MatterStructure Structure(MeshAsset mesh, Vector3 scale, int seed, float weakness, int resolution = 8);Related types#
MatterBake · MatterFracture · MatterFracturePattern · MatterStructure · MeshAsset
Source#
- MatterBakeCache.cs