Answered
0
0

Am I correct that in order for an FMOD event to make use of parameters it must be instantiated and played with someEvent.start()? In other words, there isn’t a way to have a one-shot that is affected by parameters, right?

Assuming yes, how should one play a simple, non-looping event and stop it immediately when it is over? Or do I even have to stop it in that case? The main case I’m thinking about is a simple and short sound effect (like footsteps) that will be used many times and needs to respond to some parameters. Presumably I would keep the same instance of the event alive for some period of time, and it would be triggered many times, and at some point it would be released. If I don’t stop this event between firings, will it hang onto additional system resources? Are there any other best practices around this that I should be aware of? Thanks.

  • You must to post comments
Best Answer
0
0

The one-shot helper in Unity doesn’t deal with parameters. But if you want to set parameters first the process is:

  1. Create instance
  2. Set parameters
  3. Start the instance
  4. Release the instance

By releasing the instance while it’s still playing it will play to the end and then automatically clean up all resources.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.