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