I’m making a level using the timeline editor where everything that happens is synced to the music. It works perfectly in the preview, however once I test it in play mode, everything is off by about one second.
My frame rate in timeline is set to 60.
I get 60+ FPS all the time.
Is there any way to guarantee that my audio will always be perfectly synced with what I have animated in using the timeline editor?
I figured out the problem. It turned out to be a lot simpler than I expected. All I had to do was change the Update Method in the Playable Director component to “DSP Clock”, which is a more accurate timer than the regular “Game Time” update method.
(DSP Clock returns the number of samples in the audio system, for more info check out Unity - Scripting API: AudioSettings.dspTime)