Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

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. (2.7k 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.
...