Gizmos.DrawIcon - is it possible to scale the icon?

I’m writing an editor tool and am trying to use Gizmos.DrawIcon to provide additional information about my object (you know, more than a shaded box communicates).

Gizmos.DrawIcon does not specify a draw size. There’s an optional third parameter:

static void DrawIcon(Vector3 center, string name, bool allowScaling = true); 

Which just toggles whether the icon is drawn in screen space or world space. Not useful.

Scaling the source art has no impact, which is additionally baffling.

I tried scaling the Gizmos matrix before calling DrawIcon, like so:

Gizmos.matrix = Gizmos.matrix * Matrix4x4.Scale(new Vector3(5.0f,5.0f,5.0f));

That didn’t work either.

I even tried adjusting the draw location of the icon along z-space and it has no impact.

Do people just not use this feature?? I don’t understand how it even exists if you can’t control how the icon image is drawn in the editor!

Open to alternatives! Thanks :slight_smile:

David

allowScaling parameter allow you to change the icon size in the editor when you play with the slide of the 3D Icons (from the Gizoms menu)

It is very annoying that I can’t change the icon in the editor before the user is enforced to change this size to be able to see it in the editor…

85885-capture.jpg

I think the allowScaling parameter means the scale of icon is parallel with the scale of gameobject which icon binding to when you use you middle button of mouse to scale the gameobject in scene view.