Ejemplo n.º 1
0
    private IEnumerator DestroyWhenDone()
    {
        AudioClip clip = sound.soundSample.clips[0].clip;

        while (dronesTime < clip.length)
        {
            yield return(null);
        }
        instance = null;
        Object.Destroy(base.gameObject);
    }
Ejemplo n.º 2
0
 private void Start()
 {
     instance = this;
     base.transform.SetParent(null, worldPositionStays: false);
     Object.DontDestroyOnLoad(base.gameObject);
 }