// Use this for initialization void Awake() { if (instance == null) { instance = this; } if (PlayerPrefs.HasKey("lives")) { lives = PlayerPrefs.GetInt("lives"); } Object.DontDestroyOnLoad(gameObject); //Debug.Log (lives); }
void Awake() { control = this; }