Animator Set Look At Weight#
Animation / Animator / Animator Set Look At Weight Weight, BodyWeight, HeadWeight, EyesWeight, ClampWeight
Description#
Executes the Set Look At Weight method on the Animator component
Parameters#
| Name | Description |
|---|---|
| Weight | |
| Body Weight | |
| Head Weight | |
| Eyes Weight | |
| Clamp Weight |
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 Look At Weight")]
[Category("Animation/Animator/Set Look At Weight", "Weight, BodyWeight, HeadWeight, EyesWeight, ClampWeight")]
[Description("Executes the Set Look At Weight method on the Animator component")]
[Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
[Keywords("Animation, Clip, Play, Animate")]
[Parameter("Weight")]
[Parameter("Body Weight")]
[Parameter("Head Weight")]
[Parameter("Eyes Weight")]
[Parameter("Clamp Weight")]
[Serializable]
public class GenInstructionAnimator_SetLookAtWeight_5_FloatWeight_FloatBodyWeight_FloatHeadWeight_FloatEyesWeight_FloatClampWeight : Instruction
{
[SerializeField] private GetGameObject m_Animator = new GetGameObject(
new GenTypeGameObject_Animator()
);
[SerializeField] private GetNumber m_Weight = new GetNumber();
[SerializeField] private GetNumber m_BodyWeight = new GetNumber();
[SerializeField] private GetNumber m_HeadWeight = new GetNumber();
[SerializeField] private GetNumber m_EyesWeight = new GetNumber();
[SerializeField] private GetNumber m_ClampWeight = new GetNumber();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Look At Weight");
return $"{this.m_Animator} {method} ({this.m_Weight}, {this.m_BodyWeight}, {this.m_HeadWeight}, {this.m_EyesWeight}, {this.m_ClampWeight})";
}
protected override Awaitable Run(Args args)
{
Animator component = this.m_Animator.Get<Animator>(args);
if (component == null) return Done;
component.SetLookAtWeight(
(float) this.m_Weight.Get(args),
(float) this.m_BodyWeight.Get(args),
(float) this.m_HeadWeight.Get(args),
(float) this.m_EyesWeight.Get(args),
(float) this.m_ClampWeight.Get(args)
);
return Done;
}
}
}