WKLib 0.2.3
A modding library for White Knuckle
Loading...
Searching...
No Matches
AudioUtility.cs
Go to the documentation of this file.
1using UnityEngine;
3
5
6public static class AudioUtility
7{
8 public static AudioSource PlaySound(
9 AudioClip clip,
10 Vector3 position,
11 Transform parent = null,
12 float volume = 1f,
13 float pitch = 1f,
14 bool loop = false,
15 float spatial = 1f,
16 float reverbMix = 1f,
17 bool bypassEffects = false,
18 float minDistance = 0,
19 float? maxDistance = null,
20 float? dopplerLevel = null,
21 float? spread = null,
22 AudioRolloffMode? rolloffMode = null,
23 AnimationCurve customRolloffCurve = null,
24 AudioMixerType mixerType = AudioMixerType.Sfx,
25 string sourceType = "")
26 {
27 if(!Core.Classes.AudioManager.Instance)
28 Core.Classes.AudioManager.CreateAudioManager();
29
30 return Core.Classes.AudioManager.Instance.PlaySound(
31 clip,
32 position,
33 parent,
34 volume,
35 pitch,
36 loop,
37 spatial,
38 reverbMix,
39 bypassEffects,
40 minDistance,
41 maxDistance,
42 dopplerLevel,
43 spread,
44 rolloffMode,
45 customRolloffCurve,
46 mixerType,
47 sourceType);
48 }
49}
static AudioSource PlaySound(AudioClip clip, Vector3 position, Transform parent=null, float volume=1f, float pitch=1f, bool loop=false, float spatial=1f, float reverbMix=1f, bool bypassEffects=false, float minDistance=0, float? maxDistance=null, float? dopplerLevel=null, float? spread=null, AudioRolloffMode? rolloffMode=null, AnimationCurve customRolloffCurve=null, AudioMixerType mixerType=AudioMixerType.Sfx, string sourceType="")