0151 294 3384

Unity PolyMesh 2D

UnityPatterns PolyMesh 2D Example

Unity’s a great game framework with a rich community full of generous folk who share some of their tools in the form of Unity assets/plugins. One such contributor over at unitypatterns.com share some excellent goodies to facilitate 2D game dev. PolyMesh is an editor extension that allows the user to rapidly build 2D meshes, containing both curves and straight lines, right in the Unity GUI. Creating a collider that follows a mesh’s edge is handled with a single click.

Here’s a sample of a mesh with a UnityPatterns demo texture and an automatic collider.


You would however feel quite disappointed if you’ve configured Unity to use the 2D physics system, which renders this automatic 3D collider useless. To create the 2D collider, you must make a simple modification to the PolyMesh.cs:

Creating a collider with the modified code gives us a physics collider object that will now interact with a 2D physics setup.

Modified PolyMesh Example

PolyMesh makes creating 2D platforms and large texture areas a doddle, even if it’s just for prototyping.

Unity PolyMesh 2D