Skip to main content

Extensive use of mesh colliders

Test first!
Having this warning doesn't mean the build will run slowly. It might be a false positive in many instances (i.e. the game has 100 prefabs with mesh colliders, but only a few are active at the given time).

Message

Extensive use of mesh colliders, this might affect performance.

Explanation

Mesh colliders are notorious for their performance impact: unlike simple shapes (i.e. boxes or spheres) or even compound colliders (objects having multiple colliders), the collision shapes are not analytical and require additional memory and processing power to work. Luna Expert will issue this warning if it encounters more than 10 mesh collider components in the project.

Steps to fix

Try replacing mesh colliders with primitive ones approximating the shape.

Please note, however, that in some instances it makes more sense to have a few mesh colliders consisting of tens or hundreds of vertices rather than creating tens of primitive colliders to approximate the original one.