Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug GameObject icons ignore scene visibility settings

Discussion in 'Editor & General Support' started by nitz, Dec 8, 2022.

  1. nitz

    nitz

    Joined:
    May 4, 2011
    Posts:
    54
    I'm a big fan of using isolation mode (Shift+H) to focus on just what I'm dealing with at any given moment.

    I've run into an issue where I've got a heap of GameObjects that have "icons" set on them. Icons set on the object that way don't follow scene visibility settings. (The eyeball in the hierarchy view, which is also used for isolation mode.)

    Instead, the only ways I can find to turn them off temporarily are to: actually disable the object, or disable gizmos completely.

    Is there something I'm missing or is this actually unintended behavior?

    Here's what I'm seeing:



    (2021.3.15f1)
     
    Last edited: Dec 8, 2022
  2. tomfulghum

    tomfulghum

    Joined:
    May 8, 2017
    Posts:
    78
    You can use the SceneVisibilityManager to check if the object is hidden and only draw your gizmos if it's not.
     
  3. nitz

    nitz

    Joined:
    May 4, 2011
    Posts:
    54
    Hi Tom, I appreciate the response. Unfortunately, the gizmo being drawn isn’t user drawn, it’s the one that is created by assigning an icon (in the case from my clip,
    One of the colored ones that also draws the GameObject’s name) that’s built into the editor. My clip there is in an empty project with no custom scripts at all.

    It does react with when all gizmos are turned off (I imagine the engine just disables the API), but otherwise it continues to draw.
     
  4. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,402
  5. nitz

    nitz

    Joined:
    May 4, 2011
    Posts:
    54
    Hi Spiney,

    Unfortunately I'm not seeing a way to do that in that menu. Like in the screenshot below, the behavior I'm seeing occurs with no component (other than transform) on the game object. The transform checkbox doesn't control it, nor any "Built-in" checkbox in the dropdown:

     
  6. James2Games

    James2Games

    Joined:
    May 2, 2016
    Posts:
    23
    Although this post is old i've come across it too in Unity 2022.3.7f1
    The problem is you can not hide labels put on gameobjects unless you turn off all gizmos. But if you assign an icon to a script and put that script on a gameobject then you can disable it in gizmos.

    I've posted a bug ticket with the same title as this thread so hopefully unity
     
    EricWilliams likes this.
  7. James2Games

    James2Games

    Joined:
    May 2, 2016
    Posts:
    23