Timeline Marker callback not working in Build (but works in editor)

I didn’t see anything when searching about this and hopefully I’m just missing something simple.

I have my banks setup in ‘Assets/StreamingAssets/FMOD/[platform]’

I have a timeline marker callback for everytime a music track loops to do something in Unity. This works great in editor, but when I make a build and test on device (in this case a Quest 3) the timeline markers don’t fire.

One thing I’ve noticed is that when I build, unity copies all my banks to ‘Assets/StreamingAssets/[platform[’ even though my settings show what I noted above. Could this be the cause?

All my audio plays in the build, it’s just that I don’t seem to get any callbacks. Very strange.

Any help is appreciated! Loving the power I will soon have using FMod.

Ok, I was able to figure this out finally! The handler for the callback was not a static method. REMINDER for everyone using callbacks. They must be static to run on their own thread when compiled out to IL2CPP. I finally found the error buried in the adb logcat. :-/

1 Like

Hi,

Thank you for sharing the information.

Could I please grab a bit more detail to help troubleshoot? Specifically:

  • The version number of the FMOD Unity integration you’re using
  • A code snippet showing how you’ve set up the timeline marker callback

It could be, the banks files should reside in the Assets/StreamingAssets directory.

During the build process, Unity automatically copies these banks into the appropriate platform-specific subfolder. If your banks are located in Assets/StreamingAssets/FMOD/[platform], Unity might not recognize them correctly during the build, leading to issues like missing callbacks.

We recommend to place your banks directly in Assets/StreamingAssets and let Unity handle the platform-specific organization.

Also, have you had a chance to look at this Timeline callback scripting example? It might help verify the setup.

Thank you for sharing the solution!