Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity Gizmo Size

I'm making some custom gizmos for my objects in Unity. I want them to work with the 2d and 3d-size setting in the Unity editor. Where do I get this value so I can use it in my script?

enter image description here

like image 217
The Oddler Avatar asked Nov 02 '25 12:11

The Oddler


1 Answers

If you use http://docs.unity3d.com/Documentation/ScriptReference/Gizmos.DrawIcon.html it should be automatic. Otherwise you can try http://docs.unity3d.com/Documentation/ScriptReference/HandleUtility.GetHandleSize.html to get a correct size.

like image 74
artemisart Avatar answered Nov 04 '25 12:11

artemisart