public static void PlayStandalone(string name) { SoundEffectData data = FindSoundEffect(name); if (data == null) { return; } if (soundEffectPlayer == null) { return; } if (data.playerSource != null) { if (data.playerSource.isPlaying) { return; } data.playerSource.Play(); } else { data.playerSource = soundEffectPlayer.CreateStandAloneAudioSource(); AudioClip sound = null; if (data.isLanguage) { sound = UniGameResources.currentUniGameResources.LoadLanguageResource_AudioClip(data.resourceName); } else { sound = UniGameResources.currentUniGameResources.LoadResource_AudioClip(data.resourceName); } if (sound == null) { return; } data.playerSource.clip = sound; data.playerSource.volume = data.volume; data.playerSource.Play(); } }