Search Unity

How to remove DontDestroyOnLoad warnings on 5.3?

Discussion in 'Editor & General Support' started by arkon, Jan 7, 2016.

  1. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I keep getting this warning every time I try and use DontDestoyOnLoad:-

    "DontDestroyOnLoad only work for root GameObjects or components on root GameObjects."

    This didn't show up pre Unity 5.3 so whats up?
     
  2. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    Really no support from unity? Anyone?
     
  3. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    It says how to solve those. Put these gameobjects in the root of the scene.
     
  4. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    They are, thats the problem. I have a game object in the root of the scene with a script on it that calls this API function in Awake.