Any way to hide the gizmo of a game object in the editor?

I have an editor script attached to an empty game object. My editor class displays two custom gizmos of its own, but there’s the annoying 3rd one getting in the way which belongs to the game object itself.
I’ve looked through the docs but haven’t found a way yet.

Thanks

If you click the Gizmos button in the Editor, top right hand corner of the editor view, you can make the gizmos smaller and turn some of them off altogether.

Just to clarify - you mean the 3 axes?

This is what I'm talking about. You can move the slider down to make the gizmos smaller in the editor, or check boxes to turn them off. [17789-gizmos.jpg|17789]

@jacobschellenberg - game objects have no gizmos. That's why I asked OP to clarify what he meant.

Thanks, yes, the 3 axes, but my understanding is that those controls affect whole classes of object types. I want to hide only 1 specific gizmo of 1 object. The reason is, I'm creating an editor utility and I can't expect users to reconfigure all their gizmos. I hoped there might be some undisclosed script code to let me achieve that.

1 Answer

1

Looks like you can hide them by script:

or using this: Unity - Scripting API: MonoBehaviour.OnDrawGizmosSelected()