Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How can you blend between two playable assets?

Discussion in 'Timeline' started by laenseloe, Jul 5, 2023.

  1. laenseloe

    laenseloe

    Joined:
    Mar 17, 2015
    Posts:
    5
    upload_2023-7-5_14-45-38.png
    I use timeline to build up my skill resources, so I can define some custom function like "rotate to target", "attack window" and so on
    But when there goes a combo, like SkillA to SkillB, I don't know how to make these two animations blend, the SkillB just animated suddenly after SkillA finished, how do you guys fix this problem?
     
  2. Rin-Dev

    Rin-Dev

    Joined:
    Jun 24, 2014
    Posts:
    559
    I would also like to know. Especially for action oriented games, I'd like to streamline my particle effects with my sword slashes. While timeline has allowed me to do so and very efficiently, I can't seem to get 2 playableassets to blend with each other. I've seen various threads dating back to 2018 saying this feature was being worked on with no word since.
     
  3. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    111
    Here's a script that let you set the timeline's animation weight. This only applies to animation, you can't blend other kinds of playableAssets.
    TimelineAnimationWeightSetter - Github (only the
    TimelineAnimationWeightSetter.cs
    script is needed)
    You can blend between 2 Timeline Animations by easing the second timeline's weight from 0 to 1.
     
    Rin-Dev likes this.
  4. Rin-Dev

    Rin-Dev

    Joined:
    Jun 24, 2014
    Posts:
    559
    That's pretty Interesting! I'm going to give the code you linked to a try.
    Thanks!
     
    Yuchen_Chang likes this.
  5. Rin-Dev

    Rin-Dev

    Joined:
    Jun 24, 2014
    Posts:
    559
    Just wanted to stop in and say I tried to make a sort of PlayablesAnimator manager, where I used 2 directors and a coroutine to try and blend them by setting the weights. It sorta worked, but ended up being more work than what it was worth.
    For my project, I think I'm going to continue forward with using animator and instead try to make my own tool to preview and activate particles with animations. I'll do camera work with clever tweening or something.The TimelineAnimationWeightSetter script is still pretty handy though since I can use it to blend my finishing moves back to the animator.
     
    Yuchen_Chang likes this.
  6. Rin-Dev

    Rin-Dev

    Joined:
    Jun 24, 2014
    Posts:
    559
    I ended up making my tool.
    Took a little bit of time and research but it's essentially doing what I want.
     
    Yuchen_Chang and tsukimi like this.