| Parameter | Description |
|---|---|
| mesh | The mesh to check. |
| isConvex | True to check for convex collision data, false to check for triangle collision data. |
bool Returns true if the mesh should contain pre-baked collision data in a player build, false otherwise.
Checks whether the mesh should pre-bake collision data during a player build.
When building a player, convex and/or triangle collision data can be pre-baked inside the Mesh. This allows MeshCollider referencing that Mesh to efficiently fetch that collision data at runtime.
When no collision data is pre-baked, it will be generated at runtime when the mesh is used with a MeshCollider, which can have an impact on performance.
Note that the collision data is only baked during a player build, so if the methods returns true but the mesh hasn't been built yet as part of player build, it means it doesn't contain any pre-baked collision data yet.
Additional resources: SetPreBakeCollisionMesh, ModelImporter.SetPreBakeCollisionMesh, MeshCollider.