Search Unity

Question Adding script to sub blend tree

Discussion in 'Animation' started by unity_E52400EF0AD091A4FCF9, Mar 8, 2023.

  1. unity_E52400EF0AD091A4FCF9

    unity_E52400EF0AD091A4FCF9

    Joined:
    Feb 21, 2023
    Posts:
    1
    So I used a blend tree with a script to randomly have my idle jump to 'twitches' when the idle has played after a set number of seconds.

    I wanted to do the same thing to my movement blend tree that goes from slow walking to run cycle when my character is moving forward. When I add a BlendTree to my animation states in my movement blend tree I noticed there were no add behavior options as I saw in the blend tree I created in my base layer.

    Can you not attach a script to blend tree nodes after you create them as sub-blend trees?

    I also noticed the script I attached to my idle blend tree disappeared when I attached the blend tree via connections to other states but when I disconnect all the other states the script shows up again. Its still working but I don't know why visual the inspector no longer shows you the scripts you attached to the animation state. Is this a bug?