Search Unity

Feedback Toggling Gizmos more easily

Discussion in 'Editor & General Support' started by evyatron, Jun 4, 2022.

  1. evyatron

    evyatron

    Joined:
    Jul 20, 2014
    Posts:
    132
    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
    upload_2022-6-4_10-40-43.png

    (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)
     
  2. evyatron

    evyatron

    Joined:
    Jul 20, 2014
    Posts:
    132
    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 :) )
     
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,812
    I just remembered this thread when I stumbled upon this option:
    upload_2022-6-11_11-57-59.png
    This would be what you're looking for.
     
    evyatron likes this.
  4. evyatron

    evyatron

    Joined:
    Jul 20, 2014
    Posts:
    132
    YES incredible, thank you so much! No need for any editor scripts.

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

    r_chevallier

    Joined:
    Apr 20, 2014
    Posts:
    31
    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.