Search Unity

Changing Animator parameters via code

Discussion in 'Animation' started by valter-home, Aug 3, 2022.

  1. valter-home

    valter-home

    Joined:
    Sep 22, 2015
    Posts:
    115
    Is there a way to change the transition values of an Animator in Play Mode (not from a compiled game)?
    I have an animator with Greater and Less by HumanoidIdle - HumanoidWalk set to 0.1f. Then HumanoidWalk - HumanoidRun set to 8f.
    I would need to change the value of 8f while my Editor is in Play Mode in order to increase or decrease the transition between Walk and Run.
    Any suggestions?