Efficiently Tweakable Mesh- or PolygonColliders
An extension for the Unity Engine
Available on the
Documentation and Video Tutorials
Visit the support page and Unity forum thread below for more info.
Frequently Asked Questions
Does 2D ColliderGen have any impact on the game's framerate?
No - it does nothing but add a MeshCollider or PolygonCollider2D.
Be sure to use the outline vertex countparameter of the AlphaMeshCollider to optimize the vertex count according to your shape - the fewer vertices, the better.
Can I use 2D ColliderGen to update colliders during runtime?
Yes - 2D ColliderGen supports precomputing colliders for Unity Sprite Animations which are switched active accordingly. If you can't precompute them, please visit the Runtime Collider Generation documentation page for details.
I just updated, where did the 2D ColliderGen menu go?
It's now under Component - 2D ColliderGen.
Does 2D ColliderGen work with other 2D frameworks?
Yes - just attach an AlphaMeshCollider to your object.
Then by default, the main texture of the object is used. If your GameObject has no texture attached, or in case of a texture atlas, you may need to set the Advanced Settings - Custom Texture parameter to provide the desired texture. Please visit this documentation page for further info.
There are no front- and back-caps on the MeshCollider, but I need them - what can I do?
a) Switch the AlphaMeshCollider output collider type to PolygonCollider2D.
b) Enable "force convex" at the AlphaMeshCollider and tick "convex" at the MeshCollider component, then the front and back caps are added automatically.
We are sorry to say that we don't offer a solution for concave MeshCollider caps.