Position Constraint Constraint Active#
Animation / Constraints / Position Constraint / Position Constraint Constraint Active
Description#
Compares the Constraint Active property of Position Constraint component to another value
Parameters#
| Name | Description |
|---|---|
| Position 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("Position Constraint Constraint Active")]
[Category("Animation/Constraints/Position Constraint/Constraint Active")]
[Description("Compares the Constraint Active property of Position Constraint component to another value")]
[Image(typeof(IconPosition), ColorTheme.Type.Pink)]
[Keywords("Location, Follow, Transform")]
[Parameter("Position Constraint")]
[Serializable]
public class GenConditionBool_PositionConstraint_CheckConstraintActive : Condition
{
[SerializeField] private GetGameObject m_PositionConstraint = new GetGameObject(
new GenTypeGameObject_PositionConstraint()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Constraint Active");
return $"{this.m_PositionConstraint} {member}";
}
protected override bool Run(Args args)
{
PositionConstraint component = this.m_PositionConstraint.Get<PositionConstraint>(args);
if (component == null) return false;
return component.constraintActive;
}
}
}