Rotation Constraint Remove Source#
Animation / Constraints / Rotation Constraint / Rotation Constraint Remove Source
Description#
Executes the Remove Source method on the Rotation 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("Rotation Constraint Remove Source")]
[Category("Animation/Constraints/Rotation Constraint/Remove Source")]
[Description("Executes the Remove Source method on the Rotation Constraint component")]
[Image(typeof(IconQuaternion), ColorTheme.Type.Pink)]
[Keywords("Direction, Euler, Transform")]
[Parameter("Index")]
[Serializable]
public class GenInstructionRotationConstraint_RemoveSource_1 : Instruction
{
[SerializeField] private GetGameObject m_RotationConstraint = new GetGameObject(
new GenTypeGameObject_RotationConstraint()
);
[SerializeField] private GetInteger m_Index = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Remove Source");
return $"{this.m_RotationConstraint} {method} ({this.m_Index})";
}
protected override Awaitable Run(Args args)
{
RotationConstraint component = this.m_RotationConstraint.Get<RotationConstraint>(args);
if (component == null) return Done;
component.RemoveSource(
(int) this.m_Index.Get(args)
);
return Done;
}
}
}