How to prioritize events

Hello there! I’m new to FMOD. So i’m wondering, is there any way to prioritize multiple diffrient events like you can do it with number of instances of one particular event? My goal is to load events when player gets closer to them and unload them when player leaves the area, so i don’t need to launch all of events on start of the scene. Can i do it in case of using Unity but without a code?

Thanks!

What you are describing is not prioritizing but controlling when events get created and destroyed. You can achieve this by setting up a trigger/collider zone in your Unity project and setting the FMOD event emitter to start when trigger/collider enter condition is met (your trigger zone) and destroy when exiting the trigger/collider.

https://fmod.com/resources/documentation-unity?version=2.0&page=game-components.html#trigger-conditions

Hello Richard! I think it’s not quite right. I need object to be heard before player collide or enter it.

@Shmank add a separate Circle/Sphere Collider for your StudioEventEmitter, set it to Is Trigger = true and make it as big as the sound size that your Event has (eg. Radius = 20f).

Then on the StudioEventEmitter you can (as @richard_simms mentioned) set the FMOD event to start playing in OnTriggerEnter and stop playing in OnTriggerExit.

image

Aaaand it works perfectly! Thank you very much, you helped me a lot!

1 Like

Happy to help! :slight_smile: