Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Parent Constraint Weight#

Animation / Constraints / Parent Constraint / Parent Constraint Weight

Description#

Compares the Weight property of Parent Constraint component to another value

Parameters#

Name Description
Parent Constraint
Compare
Value

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

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.