forked from cgvr/DeltaVR
fix FirstPersonOcclusion invalid event handle error
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
### TODO
|
### TODO
|
||||||
* user flow: grab item? mida krabada
|
* user flow: grab item? mida krabada
|
||||||
* võtta spawnitud mudeli mõõtmed: meshcollideri max x, max y, etc? bounding box?
|
* võtta spawnitud mudeli mõõtmed: meshcollideri max x, max y, etc? bounding box? ja kontrollida spawnimisel scale'i
|
||||||
* shape scanner:
|
* shape scanner:
|
||||||
* peenikesemad kiired
|
* peenikesemad kiired
|
||||||
* mitte lihtsalt ontriggerenter ja -exit, sest kui mitu objekti lähevad samal ajal sisse
|
* mitte lihtsalt ontriggerenter ja -exit, sest kui mitu objekti lähevad samal ajal sisse
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -430,11 +430,12 @@ public class AudioManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
foreach (EventInstance eventInstance in eventInstances)
|
foreach (EventInstance eventInstance in eventInstances)
|
||||||
{
|
{
|
||||||
|
if (eventInstance.isValid()) {
|
||||||
eventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
|
eventInstance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
|
||||||
eventInstance.release();
|
eventInstance.release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class FirstPersonOcclusion : MonoBehaviour
|
|||||||
AudioOccluded.start();
|
AudioOccluded.start();
|
||||||
|
|
||||||
// 4. Releasing Instance (This allows the event to self-manage its lifetime, which is fine)
|
// 4. Releasing Instance (This allows the event to self-manage its lifetime, which is fine)
|
||||||
AudioOccluded.release();
|
//AudioOccluded.release();
|
||||||
|
|
||||||
managedInstances.Add(AudioOccluded); // ADDED
|
managedInstances.Add(AudioOccluded); // ADDED
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user