private void playAudio(string key, params IPlayOption[] options) { if (!_cueAcb.Exists(key)) { #if DEBUG UnityEngine.Debug.Log("Cue Not Found! :" + key); #endif return; } var source = _sourcePool.Rent(); source.cueSheet = _cueSheetName; source.cueName = key; foreach (var option in options) { option.ApplySetting(source); } source.Play(); _activeSources.Add(source); }
public T Rent() { return(objectPool.Rent().Behaviour as T); }