30
2014
[Asset Store] PolygonCollider2D Optimizer
![]()
Small tool for sprite PolygonCollider2D optimization (got tired of manually adjusting sprite collider vertices when doing this small ‘game’ for android)
*Main image fruit credit: Fi3uR (CC BY-NC-ND 3.0)
Asset Store Link: https://assetstore.unity.com/packages/tools/sprite-management/polygoncollider2d-optimizer-16605?aid=1101lGti
Unity Forum Link: http://forum.unity3d.com/threads/240534-Released-PolygonCollider2D-Optimizer
Documentation:
PolygonCollider2D_Optimizer_web.pdf
Features:
– Super simple workflow, real results! (increased frame rate, no more “floating colliders”)
– Optimize, Scale, Move, Filter/Remove PolygonCollider2D vertices & paths (for every selected sprite)
– Remove inner paths, Keep only largest path, Remove paths based on vertex count
– Add, Reset, Remove PolygonCollider2D’s (for every selected sprite)
– 4 Scaling modes: Estimate Neighbours, Standard Scaling, Normalized Scaling, Normalized Scaling (local center). *Scaling is useful for avoiding Box2D skin margin problems
Limitations:
– This uses unity generated PolygonCollider2D’s, its not reading the image data at all, those generated polygoncolliders are then optimized
– Not all actions are undoable (see docs), but you can always reset collider to unity
Roadmap/Future ideas:
– feel free to suggest!
Basic Tutorials
“Remove Inner Paths & Optimize”
-Start optimizer from Window / PolygonCollider2D Optimizer
– Select some sprite with PolygonCollider2D from scene (you should see in the optimizer window how many paths & vertices the collider has)
– Click “Remove inner paths” few times (until all inner paths are removed) / alternatively you could click “Keep biggest path only”
– Set Filter angle to 18 or so (seems good value in most cases)
– Click Optimize (you can click Optimize again, just incase some edge went below this angle on first round)
– And you are done!
Webplayer demos:
Non-Optimized Scene: http://unitycoder.com/upload/demos/PolygonCollider2D_Optimizer_unity_non_optimized1/
Optimized Scene: http://unitycoder.com/upload/demos/PolygonCollider2D_Optimizer_unity_optimized1/
Android .APK demos:
Non-Optimized Scene: MediaFire | DropBox
Optimized Scene: MediaFire | DropBox
—
Before & After (easy to remove holes)

—
user interface:

—
non-optimized scene: (starts to slowdown after 350+ sprites with default polygon colliders)

—
Optimized scene: (still running nicely at 600 optimized sprites, starts to dip below 40-50 at ~700 sprites)
* (optimizing workflow: select all objects, click Optimize couple times, click Remove inner paths 3-4 times, click scale twice – Done!)


—
Before scaling (default PolyCollider2D by Unity) || After optimizing & scaling:

—
Before and after optimizing (could had scaled it a bit after optimizing though)

Related Posts
7 Comments + Add Comment
Leave a comment
Recent posts
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by












Its alive: http://u3d.as/content/mgear/polygon-collider2d-optimizer
fantastic!
1 Bonus tool will be added to the package soon, more info here:
http://forum.unity3d.com/threads/released-polygoncollider2d-optimizer.240534/#post-1667020
I want to ask question. I buy this but ı cant use. Icant run editor script? how can run it ?
New menu item should appear at Window/PolygonCollider2DOptimizer
uploaded to store with Unity 5.1 just now
new alternative
https://github.com/aniketrajnish/Unity-Collider-Optimizer