Uses the collider of a PolygonCollider2D to generate a mesh for a Unity GameObject.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Changed license to MIT Apr 27, 2017
PolygonMesh2D.cs Copied script from NotWoods/latch-on Jul 7, 2016
README.md Added some extra details to getting started Mar 3, 2018
example.gif Re-added example animation Jul 7, 2016

README.md

Polygon2D Editor for Unity

Example usage animation

Uses the PolygonCollider2D collider to generate a mesh for a gameobject, letting you draw polygonal platforms in the Unity edtior via the Edit Collider button. Just drag the script onto your platform GameObject and you're good to go.

This script uses the Triangulator class.

Installing / Getting started

Just download the script and place it somewhere inside your Unity project's assets. Everything needed in contained within one file.

Use the component by dragging it onto a GameObject or by using the Add Component dialog. This will automatically add a Polygon Collider 2D component if it isn't already present.

In the Polygon Collider 2D Component, click the "Edit Collider" button to adjust the shape of the collider. The mesh will autoatically adjust itself to fill the collider.

Licensing

Licsenced under the MIT License.