Search Unity

Script animation horizontale

Discussion in 'Getting Started' started by Alekaz, Dec 9, 2020.

  1. Alekaz

    Alekaz

    Joined:
    Dec 6, 2020
    Posts:
    20
    Hello I am a big beginner in C# and I would like to have or put these tags in my script?
    private Animator animator;
    animator.Play("walk");
    animator = GetComponent(typeof(Animator)) as Animator;

    I would like the walk animation to work when I press the horizontal keys on my keyboard

    thanks ^^