public void Play(string name) { AudioSounds s = Array.Find(sounds, sound => sound.name == name); if (s == null) { Debug.LogWarning("Sound: " + name + "not found!"); return; } s.source.Play(); }
private void Awake() { Instance = this; }