void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(instance);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     sls = GameObject.FindGameObjectWithTag("SLS").GetComponent <Storelastscene>();
 }