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

Target Joint 2D Auto Configure Target#

Physics 2D / Joint / Target Joint 2D / Target Joint 2D Auto Configure Target

  • Can Read

  • Can Write

Description#

The Auto Configure Target property of the Target Joint 2D component

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;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("Target Joint 2D Auto Configure Target")]
    [Category("Physics 2D/Joint/Target Joint 2D/Auto Configure Target")]
    [Description("The Auto Configure Target property of the Target Joint 2D component")]
    
    [Image(typeof(IconBullsEye), ColorTheme.Type.Lime, typeof(Badge2D))]
    [Keywords("Physics, 2D")]
    
    [Serializable]
    public class GenTypeBool_TargetJoint2D_AutoConfigureTarget : TypeBool
    {
        [SerializeField] private GetGameObject m_TargetJoint2D = new GetGameObject(
            new GenTypeGameObject_TargetJoint2D()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_TargetJoint2D.GetPreview(source);
            if (instance == null) return default;
            
            TargetJoint2D component = instance.GetComponent<TargetJoint2D>();
            return component != null ? component.autoConfigureTarget : default;
        }
        
        public override bool Get(Args args)
        {
            TargetJoint2D instance = this.m_TargetJoint2D.Get<TargetJoint2D>(args);
            return instance != null
                ? instance.autoConfigureTarget
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            TargetJoint2D component = this.m_TargetJoint2D.Get<TargetJoint2D>(args);
            if (component != null) component.autoConfigureTarget = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_TargetJoint2D} Auto Configure Target";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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