Animator Reset Controller State#
Animation / Animator / Animator Reset Controller State
Description#
Executes the Reset Controller State method on the Animator component
Parameters#
| Name | Description |
|---|---|
| Reset Parameters |
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 Reset Controller State")]
[Category("Animation/Animator/Reset Controller State")]
[Description("Executes the Reset Controller State method on the Animator component")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Reset Parameters")]
[Serializable]
public class GenInstructionAnimator_ResetControllerState_1 : Instruction
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
[SerializeField] private GetBool m_ResetParameters = new GetBool();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Reset Controller State");
return $"{this.m_Animator} {method} ({this.m_ResetParameters})";
}
protected override Awaitable Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return Done;
component.ResetControllerState(
(bool) this.m_ResetParameters.Get(args)
);
return Done;
}
}
}