fmod / fmod-for-unity

FMOD Studio integration with Unity.
https://fmod.com/resources/documentation-unity
MIT License
181 stars 38 forks source link

Start events with correct offset in Unity Timeline #37

Closed EnricoMonese closed 1 year ago

EnricoMonese commented 2 years ago

This adds support for starting FMOD sounds in a Unity Timeline with the correct offset when the playhead is in the middle of a clip.

Currently the event is always started from the beginning. This is a problem for example if you pause the Timeline and then resume it while in the middle of an FMOD clip. The event will be restarted anew and won't be synchronized anymore. Also with this change, in the editor you will be able to press play with the playhead in the middle of an FMOD clip and it will start halfway through.

Chrisdbhr commented 1 year ago

I know its been a while but just in case someone see this, I was using this fix for a while but after I updated for the latest version 2.02.15, they implemented a fix for this issue, now events can be paused/resumed or started from the middle in editor and it plays correctly.