Animator Stop Playback#
Animation / Animator / Animator Stop Playback
Description#
Executes the Stop Playback method on the Animator component
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Animator Stop Playback")]
[Category("Animation/Animator/Stop Playback")]
[Description("Executes the Stop Playback method on the Animator component")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Serializable]
public class GenInstructionAnimator_StopPlayback_0 : Instruction
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Stop Playback");
return $"{this.m_Animator} {method}";
}
protected override Awaitable Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return Done;
component.StopPlayback();
return Done;
}
}
}