private IEnumerator DestroyWhenDone() { AudioClip clip = sound.soundSample.clips[0].clip; while (dronesTime < clip.length) { yield return(null); } instance = null; Object.Destroy(base.gameObject); }
private void Start() { instance = this; base.transform.SetParent(null, worldPositionStays: false); Object.DontDestroyOnLoad(base.gameObject); }