Post by janisjoplin on Jan 19, 2016 18:25:55 GMT
Hi All,
The second time MasterAudio.PlaySoundAtVolume is called, it returns null.
There is only one sound per group. No variations.
Can you suggest ways to debug this?
Cheers
The second time MasterAudio.PlaySoundAtVolume is called, it returns null.
There is only one sound per group. No variations.
Can you suggest ways to debug this?
public void playSound() {
_frogPlayResults = MasterAudio.PlaySoundAtVolume( _variationName, // string sType,
1.0f, // float volumePercentage,
Vector3.zero, // Vector3 sourcePosition,
null, // float? pitch = null,
frogTransform, // Transform sourceTrans = null,
null, // string variationName = null,
true, // bool attachToSource = false,
0.0f, // float delaySoundTime = 0f,
false, // bool useVector3 = false,
true, // bool makePlaySoundResult = false,
false, // bool isChaining = false,
false, // bool isSingleSubscribedPlay = false,
false ); // bool triggeredAsChildGroup = false) {
_frogPlayResults.ActingVariation.SoundFinished += soundIsOver;
}
void soundIsOver() {
StartCoroutine( "restartSound" );
}
IEnumerator restartSound() {
_frogPlayResults.ActingVariation.SoundFinished -= soundIsOver;
yield return new WaitForSeconds( randomSleep.Next( 3, 10 ) );
playSound();
}
Cheers