Look At Constraint Locked#
Animation / Constraints / Look At Constraint / Look At Constraint Locked
Description#
Compares the Locked property of Look At Constraint component to another value
Parameters#
| Name | Description |
|---|---|
| Look At Constraint |
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 Locked")]
[Category("Animation/Constraints/Look At Constraint/Locked")]
[Description("Compares the Locked property of Look At Constraint component to another value")]
[Image(typeof(IconBullsEye), ColorTheme.Type.Pink)]
[Keywords("Track, Follow")]
[Parameter("Look At Constraint")]
[Serializable]
public class GenConditionBool_LookAtConstraint_CheckLocked : Condition
{
[SerializeField] private GetGameObject m_LookAtConstraint = new GetGameObject(
new GenTypeGameObject_LookAtConstraint()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Locked");
return $"{this.m_LookAtConstraint} {member}";
}
protected override bool Run(Args args)
{
LookAtConstraint component = this.m_LookAtConstraint.Get<LookAtConstraint>(args);
if (component == null) return false;
return component.locked;
}
}
}