Class SceneCaveMeshes
The main object of a scene's <Scene> Caves.asset: its cave systems' rock meshes are sub-assets of it
(Cave <site id> P<n>, stored unreadable, each with its collider Cave <site id> C<n>: the same
triangles on positions alone, since 2026-10-20), and it keeps, per cave, the key of the inputs those meshes were built from,
so a repaint or re-cut that changes nothing about a cave keeps its meshes instead of building them again.
[PreferBinarySerialization]
public sealed class SceneCaveMeshes : ScriptableObject
- Inheritance
-
ObjectScriptableObjectSceneCaveMeshes
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Remarks
Binary. The meshes are megabytes of vertex data; as text the file was tens of megabytes of hex and slow to write. The serialization mode of an asset file follows its main object, so this attribute stores the whole file, meshes included, as binary. Unity reads either form, so a scene cut before it still loads its caves.
Generation data only. Scenes reference the meshes, never this object, so a build carries the meshes and leaves the keys out.
Fields
Caves
public List<SceneCaveMeshes.Cave> Caves
Field Value
Methods
IndexOf(int)
The index of a site's entry in Caves, or −1.
public int IndexOf(int siteId)
Parameters
siteIdint