void Awake() { rutaArchiu = Application.persistentDataPath + "/data.dat"; if (inmortal == null) { inmortal = this; DontDestroyOnLoad(gameObject); PlayGamesPlatform.Activate(); } else if (inmortal != this) { Destroy(gameObject); } }
private void Awake() { if (Time.timeScale == 0f) { Time.timeScale = 1f; } if (inmortal != null && inmortal != this) { Destroy(this.gameObject); return; } inmortal = this; GameObject.DontDestroyOnLoad(this.gameObject); }