public bool TryGetUnityMesh(MeshFilter meshFilter, bool IfClearDynamicMesh = true) { //lock (m_LockObj) { if (IsDirty) { IsDirty = false; //Get UnityMesh meshFilter.mesh = m_DynamicMesh.GenerateUnityMesh(); //Clear Dynamic Data if (IfClearDynamicMesh) { m_DynamicMesh.Clear(); } return(true); } else { return(false); } } }