Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes
Hello.

How do i change loop flag of playing soundevent. in unity5?

Music would like to repeat to unconditionally by the code. I use the "RTPC"?,
in General Discussion by Jelyoung K. (160 points)

2 Answers

+1 vote
Hi Jelyoung,

I may be wrong, but I don't think it's possible to change the loop property from code. You'll have to set it from the Sound Property Editor. If you want a looping version and a non-looping version of the same sound, you can either split them using a switch container, or you can have two different events that are identical (except for the loop option).
by Richard Goulet (5.8k points)
0 votes
Or you could set a switch to "end" the music, then have it transition to a blank/silent segment and set the transition properties to allow to play out through the exit cue.
by Monty M. (3.1k points)
I think it would be simpler to just use a "break" action on an event, no? Does that work with music events?
The break action does not appear to work on music objects.  Also, I find that using switch gives me more control over how the music will end.
...