public static GameObject PlayRandomClipAtPoint(AudioClip[] clips, Vector3 position, float volume) { if (clips.Length == 0) { return(null); } return(AudioSourceExt.PlayClipAtPointImmuneToTimeScaling(RandomExt.Pick <AudioClip>(clips), position, volume)); }
public static GameObject PlayRandomClip(AudioClip[] clips, float volume) { if (clips == null || Camera.main == null) { return(null); } return(AudioSourceExt.PlayClipAtPointImmuneToTimeScaling(RandomExt.Pick <AudioClip>(clips), Camera.main.transform.position, volume)); }