Search Unity

UI Text Do Not Destroy on Load?

Discussion in 'Scripting' started by Jana1108, Jul 8, 2015.

  1. Jana1108

    Jana1108

    Joined:
    Jun 27, 2015
    Posts:
    215
    How can I make a UI Text object not destroy on load? I added this DontDestroyOnLoad(gameObject); to a script and added that to the labels but it's not working??
     
  2. Garross

    Garross

    Joined:
    Jul 27, 2015
    Posts:
    1
    parent your text to a canvas , and make sure that both the canvas and the text have the don't destroy script :D. If the Ui's parent is destroyed it will be too .