public static void PlayAudio(string audioClipName, Unit v, float playSpeed, float duration) { AudioComponent audioComponent = v.GetComponent <AudioComponent>(); AudioClip audioClip = Game.Scene.GetComponent <AudioCacheComponent>().Get(audioClipName); if (duration > 0.01f) { audioComponent.PlayAttackSound(audioClip, playSpeed, 0); } else { audioComponent.PlayAttackSound(audioClip, playSpeed, duration); } }