private static UnityEngine.Mesh MakeDynamicMesh() { var result = new UnityEngine.Mesh(); result.MarkDynamic(); return(result); }
public override void ApplyMeshData(bool removeFromMemory) { if (topologyCache != GetTopology() || numIndicesCache != indexCount || numVerticesCache != vertexCount) { unityMesh.Clear(); topologyCache = GetTopology(); numIndicesCache = indexCount; numVerticesCache = vertexCount; } if (IsDynamic()) { unityMesh.MarkDynamic(); } ApplyVertices(); ApplyNormals(); ApplyTextureCoordinates(); ApplyTangents(); ApplyColors(); ApplyIndices(); RecalculateBounds(); if (removeFromMemory) { Clear(); } unityMesh.UploadMeshData(removeFromMemory); }
public PlatformGeometryBuffer(GeometryBuffer mesh) { this.source = mesh; unityMesh = new UnityEngine.Mesh(); unityMesh.MarkDynamic(); }