Look At Constraint Remove Source#
Animation / Constraints / Look At Constraint / Look At Constraint Remove Source
Description#
Executes the Remove Source method on the Look At Constraint component
Parameters#
| Name | Description |
|---|---|
| Index |
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;
using UnityEngine.Animations;
namespace VisualScript.Runtime
{
[Title("Look At Constraint Remove Source")]
[Category("Animation/Constraints/Look At Constraint/Remove Source")]
[Description("Executes the Remove Source method on the Look At Constraint component")]
[Image(typeof(IconBullsEye), ColorTheme.Type.Pink)]
[Keywords("Track, Follow")]
[Parameter("Index")]
[Serializable]
public class GenInstructionLookAtConstraint_RemoveSource_1 : Instruction
{
[SerializeField] private GetGameObject m_LookAtConstraint = new GetGameObject(
new GenTypeGameObject_LookAtConstraint()
);
[SerializeField] private GetInteger m_Index = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Remove Source");
return $"{this.m_LookAtConstraint} {method} ({this.m_Index})";
}
protected override Awaitable Run(Args args)
{
LookAtConstraint component = this.m_LookAtConstraint.Get<LookAtConstraint>(args);
if (component == null) return Done;
component.RemoveSource(
(int) this.m_Index.Get(args)
);
return Done;
}
}
}