UniDraw - Mesh Generation for 2D Games!!!

Hi Guys,

I have a simple editor extension here that I have been working on for a little while now; That I name UniDraw.

The point of this extension is to allow the creation of meshes for 2D Games in unity!! It can also be used in 3D games, But the primary intention of this was for 2D.

The extensions features:

  • Custom Editor For Ease Of Use.
  • Scene View Utilites For Placement of Keypoints or Vertices.
  • Debug/Handles to help visually aid the creation of your mesh.
  • Dynamic Triangle Calculation.
  • Dynamic UV Generation.
  • Dynamic 2D Colliders Generated. - The Editor will take the vertices of the mesh and create a collision mesh based off of this.

Heres a sceenshot of the current state of the editor:

Place your Vertices using the button in the inspector to add one and using the scenes handles to modify the position of the Vertices:

Modify your Vertices as much as you like, the Editor will draw lines to help you visualise what the meshes shape will look like once generated

If you feel like being more precise you can use the inspector to modify your vertices, you can also delete a vertices, or add one above or below the vertices index.

Remove All Vertices in oppose to certain vertices.

Use the inspector to set the width of the collider.

Use the inspector to set a name for your new mesh and click the “Create Mesh” button to spawn your new mesh!!

take a look at your mesh, it will have a collider on it generated based off the shape of the mesh, extruded so in 2D objects can still collide with it well.

I have added all features I can think of for now. Please let me know if there are any features you can think of and I shall work on getting them implemented before release!

I plan to upload this to the asset store once I and the users are happy with it.

Thanks,

Scott.

1 Like

Update:

I am now drawing splines, I will soon be able to generate spline based meshes! :slight_smile:

1 Like

Looks like a catmull rom spline?

One suggestion is to think about how to make your tool easier to use, ie more wisywig-like … for example your add vertex button does not enthuse me, I want to click on the object itself to add a vertex. Otherwise looks interesting.

Hi imaginaryhuman,

Thanks for your input! means allot :slight_smile:

Yes its a cat mull rom spline(I think), I am pretty new to splines, this is the first one I actually have working how I want it to. I am still working on getting it right though.

I will probably change it to a bezier spline with anchors for more customisation, but this was just a test for something else I am working on really.

I agree that the button is long winded to use, I would prefer not to use it however when I use the mouses input from editor scripting the mouse’s position is never really where the user clicks. It’s something I will revisit ASAP and try implement again. But my original tests failed.

I will try make the suggestion you advised.

Thanks,

Scott.

you are the man :slight_smile:
this is an old request from me to unity :
http://feedback.unity3d.com/unity/all-categories/1/hot/active/built-in-drawing-mesh-colliders-
but i guess no one need ! except me :slight_smile:
good luck

m;

Polygon tool has been around for a while and has the EXACT same functionality. it’s 10$ on the app store… give me some more features :smile:

Polygon Tool By Divide<<<

Hi Thanks for the positive feedback :slight_smile: Means Allot!

What features would you like? : )

1 Like

Update!

Added Grid System:

  • Visual Aiding for meshes.

Snap To Grid System:

  • Snapping your vertices to the grid for precise placement.

Added Double Click Vertices Placement:

  • Double Click To Add A Vertices now in oppose to the old button method.

1 Like

I have added the mouse clicking vertices feature you requested! :slight_smile: Works perfectly now!!!

hmm… one of the things that I would like is face texturing, allow me to click a face and select a texture for it… then let me choose a texture for it :smile: