Search Unity

Unity BUG, Game screen is not updated when a gameobject is set inactive or when gameobject is delete

Discussion in 'Editor & General Support' started by dafunker, Sep 12, 2014.

  1. dafunker

    dafunker

    Joined:
    Oct 15, 2013
    Posts:
    20
    You can find a screencast showing the issue
    http://screencast.com/t/8hrfLZLWP

    The example is pretty simple, a group of gameobjects is set as inactive (via Unity editor), the Scene is well updated but the game screen not.
    When i toggle the Camera's active status, the game screen becomes OK.

    Does someone have an idea of what's going on ?
    (I'm using the latest version of Unity 4.5.4f1, September 12th 2014)
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    This isn't a Unity bug. NGUI doesn't seem to update the visualization of the components when they are deactivated in the editor while in play mode, meaning it is a bug in NGUI. Keep in mind that none of those game objects is responsible to draw itself, but one of the parent components does it instead. That's why it is still visible.
     
  3. dafunker

    dafunker

    Joined:
    Oct 15, 2013
    Posts:
    20
    Many thanks for the prompt reply.
    You drove me on a good track and i have found the solution.

    I set up a simple scene (no NGUI), with 1 sprite and 1 camera. The bug was still there.
    The bug come from the Camera's "Clear flags" property. When using "Depth only", Game screen is not updated like shown in the Screencast. Everything works well when "Clear flags" is set to "Skybox".
     
  4. dafunker

    dafunker

    Joined:
    Oct 15, 2013
    Posts:
    20
  5. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Thanks for sharing!