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.

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

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"?,
asked Dec 7, 2015 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).
answered Feb 11, 2016 by Richard Goulet (5,740 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.
answered Apr 12, 2016 by Monty M. (2,650 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.
...