static void GetMeshData(MassMeshes target) { MassMeshData data = null; foreach (var d in DataList) if (d.id == target.id) data = d; if (data == null) { target.CreateMesh (); data = new MassMeshData (target.id, target.mesh, target.numInSingleMesh); DataList.Add (data); } else { target.mesh = data.mesh; target.numInSingleMesh = data.numInSingleMesh; } }
static void GetMeshData(MassMeshes target) { MassMeshData data = null; foreach (var d in DataList) { if (d.id == target.id) { data = d; } } if (data == null) { target.CreateMesh(); data = new MassMeshData(target.id, target.mesh, target.numInSingleMesh); DataList.Add(data); } else { target.mesh = data.mesh; target.numInSingleMesh = data.numInSingleMesh; } }