forked from cgvr/DeltaVR
fix FirstPersonOcclusion invalid event handle error
This commit is contained in:
Binary file not shown.
@@ -430,11 +430,12 @@ public class AudioManager : MonoBehaviour
|
||||
{
|
||||
foreach (EventInstance eventInstance in eventInstances)
|
||||
{
|
||||
eventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
|
||||
eventInstance.release();
|
||||
if (eventInstance.isValid()) {
|
||||
eventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
|
||||
eventInstance.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private void OnDestroy()
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ public class FirstPersonOcclusion : MonoBehaviour
|
||||
AudioOccluded.start();
|
||||
|
||||
// 4. Releasing Instance (This allows the event to self-manage its lifetime, which is fine)
|
||||
AudioOccluded.release();
|
||||
//AudioOccluded.release();
|
||||
|
||||
managedInstances.Add(AudioOccluded); // ADDED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user