Toggling Gizmos more easily

Hello,

I believe since moving to 2021.3.0f1 expanding/collapsing a component in the inspector not longer toggles its Gizmos. I don’t think that’s necessarily bad, just need to unlearn that behaviour.

However that does mean that you can’t quickly toggle gizmos on and off. In larger projects you end up with a lot of gizmos, and you often want to turn specific ones on and off quickly.

The new searchable gizmos menu is great - but if I have 40 components drawing gizmos, along with dozens (or hundreds?) 3rd party ones, finding the correct one to toggle is still a pain. Not to mention it likely means

  1. Selecting the gizmo in the scene
  2. Figuring out which of the game object’s component is drawing the gizmo I want to get rid of
  3. Opening the Gizmos menu and searching for that component
  4. If a game object has 3 components on it, I need to keep searching for each one and toggle it until I find the right one.

Could we maybe wave a very quick way of doing that from within the component inspector itself?
Either a toggle button (in the component header, next to the Help/Preset/Menu buttons), or a context menu option?

For reference I cobbled together using reflection a context menu option from scripts I found online that does that, and it’s instantly easier to use (to me) than searching through the menu:
This means if I have a bunch of gizmos filling up my screen I can

  1. Select the gizmo in the scene
  2. Right click the component header → Toggle Gizmos

(Unfortunately I couldn’t get it to work for built-in components due to them using the internal classId which, as far as I could tell, I had no way of telling given a component Type)

bump - I know since this is mainly just feedback it might not get a lot of replies, but would be good to know whether this is just me or if others are missing this as well!
(also of course whether I’m actually missing a feature/toggle that does that automatically :slight_smile: )

I just remembered this thread when I stumbled upon this option:


This would be what you’re looking for.

YES incredible, thank you so much! No need for any editor scripts.

(imagine if Unity support people were monitoring these forums!)

Thank you,
This is a very useful feature and I thought Unity may have gotten rid of it because I saw a thread were they were taking a poll regarding this feature.