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