/Unity-UI-Polygon

Polygon renderer for the new Unity UI

Primary LanguageC#MIT LicenseMIT

Unity-UI-Polygon

Polygon renderer for the new Unity UI

This is a graphic control for drawing polygons in the UI System.

[UI > Extensions > Primitives > UI Polygon]

I wrote this script as an addition to the extension project for the new Unity UI system mantained by Simon "ddreaper" Jackson (https://bitbucket.org/ddreaper/unity-ui-extensions) and because I needed to draw an hexagon in one of my games ui.

I really recommend to try out the Unity UI Extensions, but this script works also on its own: just import it in your Unity project.

Usage

Make sure that "UIPolygon.cs" in imported in your project folder.

Add the Canvas:

Create an empty object:

Add the script to the empty object:

Edit the polygon properties as you like!

Edit your polygon

Examples:

Need help?

Contact me here!