void Awake() { if (instance != null) { Destroy(gameObject); } else { instance = this; GameObject.DontDestroyOnLoad(gameObject); } }
void Awake() { if (instance == null) { DontDestroyOnLoad(gameObject); instance = this; } else { Destroy(gameObject); } }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
private void Awake() { SaveLoad = GameObject.Find("SaveLoad").GetComponent <saveLoad>(); bgms = GameObject.Find("bgm").GetComponent <bgm>(); body = playStoreURL; }
// Use this for initialization void Start() { a1 = GetComponent <AudioSource>(); ins = this; }