Home

Awesome

Unity Collider Optimizer

Optimizes Mesh & Polygon colliders in Unity.

placeholder_uco

Polygon Collider Optimizer

PCO_V1PCO_V2PCO_V3
Original SpriteUnity Polygon ColliderOptimized Polygon Collider
Path Count213 paths23 paths

The tool uses a C# implementation of the Ramer Douglas Peucker Algorithm to smooth the polylines and reduce the number of paths created by a Polygon Collider in Unity.

Performance Comparison

https://github.com/aniketrajnish/Unity-Collider-Optimizer/assets/58925008/e134f0c6-4c08-4552-b69f-22e7f3b61ebe

You can run this test on your machine by cloning the project and going to the Polygon Collider Optimization Test scene in Unity.

Usage

https://github.com/aniketrajnish/Unity-Collider-Optimizer/assets/58925008/74f5bdd1-f5c8-4c44-b745-78211919aae3

Mesh Collider Optimizer

MCO_V1MCO_V2MCO_V3
Original MeshUnity Mesh ColliderOptimized Mesh Collider
Triangles Count9132 tris2416 tris

The tool uses the Computational Geometry Unity Library by Erik Nordeus 🐐 to perfrom the Quadric Error Metrics simplification on the shared mesh of the mesh collider.

Performance Comparison

https://github.com/aniketrajnish/Unity-Collider-Optimizer/assets/58925008/cfba7837-a81e-4891-9594-501fbf31680f

You can run this test on your machine by cloning the project and going to the Mesh Collider Optimization Test scene in Unity.

Usage

https://github.com/aniketrajnish/Unity-Collider-Optimizer/assets/58925008/ddb08b48-d241-494c-a6f4-0a822424964a

Updates

v004

https://github.com/aniketrajnish/Unity-Collider-Optimizer/assets/58925008/ba42c61c-4ea1-419d-bf81-324304a218b8

Contribution

Contributions to the project are welcome. Currently working on converting the QEM algorithm to a coroutine to stop the main Unity thread from freezing.

Known Bugs

License

MIT License