I’m trying to sync some Unity objects with fmod music. Sometimes, I have to call musicEmitter.EventInstance.setTimelinePosition(int) in order to move the timeline to correct time. But this function doesn’t execute instantly (checked with getTimelinePosition). For one of my shorter music, it’s 3 frames late and for one longer music track it’s 8 frames late. By the time it actually jumps to desired position, my Unity objects have already moved away.
So, I either have to calculate the time it takes to execute this function, or I need to make my Unity objects wait for its execution.
For both scenarios, I need a feedback on when the setTimelinePosition really moves the timeline. Is there such a way?
PS I can’t use getTimelinePosition to check when it jumped to desired time because it’s not that precise, it sometimes happen that it jumps to the desired pos and plays a little bit before getTimelinePosition gets the time, so it returns (desiredPos + thatLittleBit).