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 Set Translation Offset#

Animation / Constraints / Parent Constraint / Parent Constraint Set Translation Offset

Description#

Executes the Set Translation Offset method on the Parent Constraint component

Parameters#

Name Description
Index
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 Set Translation Offset")]
    [Category("Animation/Constraints/Parent Constraint/Set Translation Offset")]
    [Description("Executes the Set Translation Offset method on the Parent Constraint component")]
    
    [Image(typeof(IconHanger), ColorTheme.Type.Pink)]
    [Keywords("Socket, Ancestor, Keep, Track, Follow")]
    
    [Parameter("Index")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionParentConstraint_SetTranslationOffset_2 : Instruction
    {
        [SerializeField] private GetGameObject m_ParentConstraint = new GetGameObject(
            new GenTypeGameObject_ParentConstraint()
        );
        
        [SerializeField] private GetInteger m_Index = new GetInteger();
        
        [SerializeField] private GetVector3 m_Value = new GetVector3();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Set Translation Offset");
            return $"{this.m_ParentConstraint} {method} ({this.m_Index}, {this.m_Value})";
        }
        
        protected override Awaitable Run(Args args)
        {
            ParentConstraint component = this.m_ParentConstraint.Get<ParentConstraint>(args);
            if (component == null) return Done;
            
            component.SetTranslationOffset(
                (int) this.m_Index.Get(args),
                (Vector3) this.m_Value.Get(args)
            );
            
            return Done;
        }
    }
}

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