EazySoundManagerPlayMusic Method (AudioClip, Single, Boolean, Boolean, Single, Single, Single, Transform) |
Play background music
Namespace:
Hellmade.Sound
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static int PlayMusic(
AudioClip clip,
float volume,
bool loop,
bool persist,
float fadeInSeconds,
float fadeOutSeconds,
float currentMusicfadeOutSeconds,
Transform sourceTransform
)
Parameters
- clip
- Type: AudioClip
The audio clip to play - volume
- Type: SystemSingle
The volume the music will have - loop
- Type: SystemBoolean
Wether the music is looped - persist
- Type: SystemBoolean
Whether the audio persists in between scene changes - fadeInSeconds
- Type: SystemSingle
How many seconds it needs for the audio to fade in/ reach target volume (if higher than current) - fadeOutSeconds
- Type: SystemSingle
How many seconds it needs for the audio to fade out/ reach target volume (if lower than current) - currentMusicfadeOutSeconds
- Type: SystemSingle
How many seconds it needs for current music audio to fade out. It will override its own fade out seconds. If -1 is passed, current music will keep its own fade out seconds - sourceTransform
- Type: Transform
The transform that is the source of the music (will become 3D audio). If 3D audio is not wanted, use null
Return Value
Type:
Int32The ID of the created Audio object
See Also