public void AddPoint(Vector3 point) { line.Add(point); if (line.Count >= 2) { GenerateMesh(mesh.mesh); ColliderGenerator.Generate(mesh.mesh, collider); } }
public void Generate( float x, float z) { Vector3 pos = new Vector3(x, 0, z); WaitCallback callback = new WaitCallback(delegate { meshData = ColliderGenerator.Generate(datas, pos); actionsToDo.Enqueue(PutMeshValues); }); ThreadPool.QueueUserWorkItem(callback); }
public void Generate( float x, float z) { Vector3 pos = new Vector3(x, 0, z); WaitCallback callback = new WaitCallback(delegate { try { meshData = ColliderGenerator.Generate(datas, pos); actionsToDo.Enqueue(PutMeshValues); } catch (Exception e) { Debug.LogWarning(e.Message); } }); ThreadPool.QueueUserWorkItem(callback); }