Search Unity

Play Animation until i stop pressing it

Discussion in 'Scripting' started by aaronghosh14A, Sep 14, 2020.

  1. aaronghosh14A

    aaronghosh14A

    Joined:
    Nov 9, 2019
    Posts:
    13
    Hello everyone , i want to make that when i have pressing the button the walk animation should loop but when i press it , it plays for 3 sec then stops .
    Can anybody help me how to play a animation until i stop pressing it .
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,735
    Make sure the animation is set to loop.

    Also, open the animator window while this is happening (monitor in realtime) and make sure the end condition isn't happening for some reason.
     
  3. aaronghosh14A

    aaronghosh14A

    Joined:
    Nov 9, 2019
    Posts:
    13
    Ok i'll check thx