void UpdateMesh() { if (inited) { handle.Complete(); } Profiler.BeginSample("Set Vertex Data"); VertexOps.SetVertexDataToMesh(mesh, vertices); Profiler.EndSample(); handle = new VertexJob() { vertices = vertices, size = SIZE, time = Time.time }.Schedule(TOTAL_SIZE, 0); handle = new NormalsJob() { vertices = vertices, size = SIZE, }.Schedule(TOTAL_SIZE, 0, handle); if (!inited) { int[] tris = MeshTest.GetTris(SIZE, TOTAL_SIZE); mesh.triangles = tris; inited = true; } }
void Start() { // ObjExporter.MeshToFile(gameObject.GetComponent <MeshFilter>(), " Assets/ ExportedObj/wall.fbx", 1); MeshTest.CreatMesh(Application.dataPath + "/MMM/", "Wall.fbx", gameObject.GetComponent <MeshFilter>().mesh); }