// Start is called before the first frame update
    void Awake()
    {
        // if the singleton hasn't been initialized yet
        if (instance != null)
        {
            Destroy(this);
            return;//Avoid doing anything else
        }

        instance = this;
        PlayAudio();
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     Instance    = this;
     clipManger  = new ClipManger();
     audioManger = new AudioManger(gameObject);
 }