I make script DontDestroyOnLoad & Destroy clone and attach on Canvas where is text:
function Awake ()
{
// Make LevelData a singleton, so we keep ourself alive and kill any clones
if ( GameObject.FindGameObjectsWithTag("Destroy").Length != 3 ) // If one of me already exists I must be a clone, so destroy me (don't feel bad about it)
Destroy (gameObject);
else // I'm the original, so keep me around
DontDestroyOnLoad (gameObject);
}
But when I load level My text missing of script... U can see on picture...![alt text][1]
[1]: /storage/temp/69082-bez-naslova.png
How can I fix this problem? Please help :)
↧