Search Unity

Bug event at clip time 0 gets run early when clip not at timeline time 0 (and clip pre-extrapolate=hold)

Discussion in 'Timeline' started by uani, Jul 30, 2020.

  1. uani

    uani

    Joined:
    Sep 6, 2013
    Posts:
    232
    event at clip time 0 gets run early when clip not at timeline time 0 (and clip pre-extrapolate=hold)

    I didn't expect this.

    If this currently behaves as specified, perhaps a new option "apply extrapolation to events" is helpful.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    That's an interesting use case. I assume this is an animation event? It is firing because frame 0 is being played (and held) when using pre-extrapolation. So, it's *technically* doing what it is asked, but it's understood that may not be what you intend it to do.

    A couple of options in the meantime.

    1) You can turn off pre-extrapolate, in preview, the pose will return to the default in the pre-extrapolate area when scrubbing, but may do what you want (or reasonable) at runtime.
    2) Use a single frame pose animation clip (without an event) stretched out before that clip.
     
  3. uani

    uani

    Joined:
    Sep 6, 2013
    Posts:
    232
    Yes, this is an animation event.