I have animations that will loop and sounds that will go along with those animations. However, the sounds are usually shorter than the animations themselves. For example I have an animation “laugh” which lasts 5 seconds, while the respective sound for it lasts only 3 seconds. I need to make it so the laugh sound plays when the animation starts as well as when it loops and starts again. What is the best way to have the sounds synchronized? I could call an InvokeRepeat function for the duration of the animation, but then I would have to deal with canceling invokes when he animation is interrupted and I am trying to avoid it. I am hoping there is a cleaner, more elegant solution. Any ideas?
Thanks in advance!