# Timeline callback example has wrong signature

**URL:** <https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704>\
**Category:** Unity\
**Created:** [April 29, 2020, 11:55am UTC](https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704 "2020-04-29T11:55:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![samanabo](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@samanabo](https://qa.fmod.com/u/samanabo)\
**Post date:** [April 29, 2020, 11:55am UTC](https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704/1 "2020-04-29T11:55:28Z")

</div>

Hi I’m seeing an issue in the Timeline Callback example for the unity integration here: [Scripting Examples | Timeline Callbacks](https://www.fmod.com/resources/documentation-unity?version=2.1&page=examples-timeline-callbacks.html)

When copying this example into my project I get an error `No overload for 'BeatEventCallback' matches delegate 'EVENT_CALLBACK'`

It appears as though the signature for FMOD.Studio.EVENT\_CALLBACK is `EVENT_CALLBACK_TYPE type, IntPtr _event, IntPtr parameters`

But in this example it is listed as `FMOD.Studio.EVENT_CALLBACK_TYPE type, FMOD.Studio.EventInstance instance, IntPtr parameterPtr`

Is there something I’m missing here? How can I properly hook up a Timeline callback in version 2.1

---

<div class="post-metadata">

**Author:** ![alexzzen](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexzzen/32/6825_2.png) [@alexzzen](https://qa.fmod.com/u/alexzzen)\
**Post date:** [April 29, 2020, 3:27pm UTC](https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704/2 "2020-04-29T15:27:15Z")

</div>

Replace the parameter `FMOD.Studio.EventInstance instance` in BeatEventCallback with `IntPtr instancePtr`. Add `FMOD.Studio.EventInstance instance = new FMOD.Studio.EventInstance(instancePtr);` direct below in the static method, then it will work.

---

<div class="post-metadata">

**Author:** ![samanabo](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@samanabo](https://qa.fmod.com/u/samanabo)\
**Post date:** [April 29, 2020, 3:48pm UTC](https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704/3 "2020-04-29T15:48:17Z")

</div>

Thank you that fixed it.  
Perhaps the documentation should be updated as well.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [May 1, 2020, 12:02am UTC](https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704/4 "2020-05-01T00:02:25Z")

</div>

Thanks for bringing that to our attention, I’ll get that corrected for our next release.

---

<div class="post-metadata">

**Author:** ![JackTheRobot](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@JackTheRobot](https://qa.fmod.com/u/JackTheRobot)\
**Post date:** [January 5, 2024, 5:18pm UTC](https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704/5 "2024-01-05T17:18:59Z")

</div>

Heads up that I think this still hasn’t been corrected

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [January 7, 2024, 10:01pm UTC](https://qa.fmod.com/t/timeline-callback-example-has-wrong-signature/15704/6 "2024-01-07T22:01:48Z")

</div>

Looking at our revision history, it looks like it was fixed up shortly after my comment above. You can see the creation of the `EventInstance` handle [here](https://www.fmod.com/docs/2.02/unity/examples-timeline-callbacks.html#:~:text=FMOD.Studio.EventInstance%20instance%20%3D%20new%20FMOD.Studio.EventInstance(instancePtr)%3B), initialized from the callback’s `IntPtr`.
