void Awake() { worldData = GameObject.Find("WorldData").GetComponent <WorldData>(); for (int i = 0; i < worldData.players.Length; i++) { pc[i] = worldData.players[i].GetComponent <PlayerControl>(); } audio = GameObject.Find("Audios").GetComponent <AudioPlaying>(); }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }