Content-Length: 20955 | pFad | https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/Animation.Stop.html
Stops all playing animations that were started with this Animation.
Stopping an animation also Rewinds it to the Start.
using UnityEngine;
public class ExampleScript : MonoBehaviour { Animation anim;
void Start() { anim = GetComponent<Animation>(); }
void Update() { if (Input.GetButtonDown("Jump") && anim.isPlaying) { anim.Stop(); } } }
Stops an animation named name.
Stopping an animation also Rewinds it to the Start.
using UnityEngine;
public class ExampleScript : MonoBehaviour { Animation anim;
void Start() { anim = GetComponent<Animation>(); }
void Update() { if (Input.GetButtonDown("Jump") && anim.isPlaying) { anim.Stop("CubeJump"); } } }
Fetched URL: https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/Animation.Stop.html
Alternative Proxies: