// Use this for initialization void Start() { this.speed = 20; audi = gameObject.GetComponent <AudioSource>(); soundController = GameObject.Find("SoundController"); sound = soundController.GetComponent <MainSoundController>(); // sound.someMethod(Instrument()); }
void Start() { if (instance != null) { Destroy(gameObject); Debug.Log("One Music Destroyed"); return; } instance = this; DontDestroyOnLoad(gameObject); muteSound(); }
void Start() { if (instance != null) { Destroy(gameObject); Debug.Log("One Music Destroyed"); return; } instance = this; DontDestroyOnLoad(gameObject); checkSound(); Screen.sleepTimeout = SleepTimeout.NeverSleep; }