Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

different behavior between debug and build version

Discussion in 'Editor & General Support' started by donchen, Jun 25, 2013.

  1. donchen

    donchen

    Joined:
    May 27, 2013
    Posts:
    4
    I used unity3d to build a scene and used NGUI to draw shopping UI. There are 2 cameras(Main Camera and Shopping Camera) placed in different coordinate, normally the main camera is enabled. When clicked the shop, I disabled the main camera and enable the shopping camera, then the shopping UI showed.
    When I finished, I tested it in unity editor and it works fine. But when I built a release(File->Build Settings->Build), it works not correctly. When I click the shop, the shop UI shows, but the objects in front of main camera doesn‘t hide, but I am already set the main camera disabled.
    My unity version is 4.12 and NGUI version is 2.5.0.c.
    Thanks a lot in advance!
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    The problem is probably that your GUI camera dos have the clear flag set to "Don't clear". (Not sure about Depth only)
    Set it to "Solid color" or Skybox to get rid go the old stuff.
    Alternatively you can use a sprite to cover your background.
     
  3. donchen

    donchen

    Joined:
    May 27, 2013
    Posts:
    4
    I works!
    I can’t express my gratitude too much!