/// <summary> /// Sets the position of each vertex to it's base position. /// </summary> protected void ResetVertexData() { MeshDataUtil.ResetVertexData(meshData); }
protected override void DeformVertexData() { // I'm not threading savvy, but I have a hunch that using all these locks isn't the ideal solution. lock (deformers) { RemoveNullDeformers(); for (var deformerIndex = 0; deformerIndex < deformers.Count; deformerIndex++) { lock (deformers[deformerIndex]) { if (deformers[deformerIndex].update) { meshData = deformers[deformerIndex].Modify(meshData, SyncedTransform, MeshDataUtil.GetBounds(meshData)); } } } } NotifyPostModify(); }
/// <summary> /// Sets vertexData to the vertexData of the original mesh. /// </summary> public void RecreateVertexData() { meshData = MeshDataUtil.GetMeshData(originalMesh); }