Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Keep gameobject to another scene

Discussion in 'Scripting' started by Keizhacook, Oct 26, 2014.

  1. Keizhacook

    Keizhacook

    Joined:
    Oct 9, 2014
    Posts:
    6
    How can I keep/pass a ceratin gameobject to another scene when using NGUI? and I try the DontDestroyOnLoad and put it in the gameobject [ex. Health bar] and its not working. Please Help
     
  2. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    This is the Unity scripting forum, for questions about scripting with Unity.

    DontDestroyOnLoad() works perfectly fine.

    If you're having a problem with NGUI, which is 3rd party software, you should go ask the dudes who made what you're using.
     
  3. Keizhacook

    Keizhacook

    Joined:
    Oct 9, 2014
    Posts:
    6
    is DontDestroyOnLoad() work only in parent?
     
  4. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    DontDestroyOnLoad() works on everything.
    Take a screenshot or something. It's hard to even imagine what you're doing.