Cooks the mesh collision data and updates the virtual asset. action cannot be performed on a main thread. [Deprecated on 16.06.2022, expires on 16.06.2024] Can be used only for virtual assets (see and ). The collision data type. The so
(CollisionDataType type, Vector3[] vertices, uint[] triangles, ConvexMeshGenerationFlags convexFlags = ConvexMeshGenerationFlags.None, int convexVertexLimit = 255)
| 20 | /// <param name="convexVertexLimit">The convex mesh vertex limit. Use values in range [8;255]</param> |
| 21 | /// <returns>True if failed, otherwise false.</returns> |
| 22 | [Obsolete("Use CookCollision with Float3 and Float2 parameters instead")] |
| 23 | public bool CookCollision(CollisionDataType type, Vector3[] vertices, uint[] triangles, ConvexMeshGenerationFlags convexFlags = ConvexMeshGenerationFlags.None, int convexVertexLimit = 255) |
| 24 | { |
| 25 | if (vertices == null) |
| 26 | throw new ArgumentNullException(); |
| 27 | var tmp = new Float3[vertices.Length]; |
| 28 | for (int i = 0; i < tmp.Length; i++) |
| 29 | tmp[i] = vertices[i]; |
| 30 | return CookCollision(type, tmp, triangles, convexFlags, convexVertexLimit); |
| 31 | } |
| 32 | |
| 33 | /// <summary> |
| 34 | /// Cooks the mesh collision data and updates the virtual asset. action cannot be performed on a main thread. |
nothing calls this directly
no test coverage detected