Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Timeline Input Weight is not right when clip added in runtime

Discussion in 'Timeline' started by Figo_Hunter, Aug 5, 2019.

  1. Figo_Hunter

    Figo_Hunter

    Joined:
    Feb 12, 2016
    Posts:
    2
    I am trying to add animation clip onto the timeline in runtime and have them blended with each other. However, the overlapping part of the animation clips which should be blending between animations does not work properly. And I found out the animation blending on Timeline works well when timeline editor window is open, but it broke when the window is closed. Through the PlayableGraph Visualizer, I found it seems to be a input weight of the playable problem when process into the mixer. Both weights of the animation clips become 1 when they should be a blending weight. Is there anything I missed after adding clilps on to the track, which can help compute the playable input weights?
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    909
    I believe you need to set the blendInDuration and blendOutDuration on the overlapping clips. The editor does that, but the API doesn't handle it automatically.
     
    Figo_Hunter likes this.
  3. Figo_Hunter

    Figo_Hunter

    Joined:
    Feb 12, 2016
    Posts:
    2
    You save my day