/// <summary> /// Setup this instance. /// </summary> public void Setup() { SetupDictionaries(); switch (pocketType) { case SoundPocketType.Subtractive: if (SoundManager.Instance.currentPockets.Count == 1 && SoundManager.Instance.currentPockets[0] == pocketName) { return; } SoundManager.DeleteSFX(); SoundManager.Instance.currentPockets.Clear(); break; case SoundPocketType.Additive: default: if (SoundManager.Instance.currentPockets.Contains(pocketName)) { return; } break; } for (int i = 0; i < pocketClips.Count; i++) { AudioClip pocketClip = pocketClips[i]; if (clipsInGroups.ContainsKey(pocketClip.name)) { SoundManager.SaveSFX(pocketClip, clipsInGroups[pocketClip.name]); } else { SoundManager.SaveSFX(pocketClip); } SoundManager.ApplySFXAttributes(pocketClip, sfxPrePoolAmounts[i], sfxBaseVolumes[i], sfxVolumeVariations[i], sfxPitchVariations[i]); } SoundManager.Instance.currentPockets.Add(pocketName); }