Class SerializedMesh
Serializable representation of a mesh. Used to store simulation mesh data without keeping mesh references in game files.
Namespace: NWH.DWP2.WaterObjects
Assembly: NWH.DWP2.dll
Syntax
[Serializable]
public class SerializedMesh
Fields
| Edit this page View Sourcetriangles
Triangle indices of the mesh.
Declaration
[SerializeField]
public int[] triangles
Field Value
| Type | Description |
|---|---|
| int[] |
vertices
Vertex positions of the mesh.
Declaration
[SerializeField]
public Vector3[] vertices
Field Value
| Type | Description |
|---|---|
| Vector3[] |
Methods
| Edit this page View SourceDeserialize()
Deserializes the stored data back into a Mesh object.
Declaration
public Mesh Deserialize()
Returns
| Type | Description |
|---|---|
| Mesh | Reconstructed mesh or null if data is invalid. |
Serialize(Mesh)
Serializes a mesh into vertex and triangle arrays.
Declaration
public void Serialize(Mesh mesh)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | mesh | Mesh to serialize. |