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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question How can I disable a blend tree in animator through script ?

Discussion in 'Animation' started by Chocolade, Nov 12, 2020.

  1. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    903
    upload_2020-11-12_23-34-27.png

    I want to disable the Grounded orange blend tree. When the game is running the blue slider in the Grounded is keep moving over and over again on it. I want to disable it.
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,334
    Use animator.Play or CrossFade to go to a different state.
     
    Chocolade likes this.
  3. Chocolade

    Chocolade

    Joined:
    Jun 19, 2013
    Posts:
    903
    Working and then if I want to set back the Grounded blend tree to play as before instead the new state that is playing now ?
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,334
    I'm not sure what you're asking. If you want to play a different state, call Play or CrossFade again.