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

Edge Collider 2D Use Adjacent End Point#

Physics 2D / Collider 2D / Edge Collider 2D / Edge Collider 2D Use Adjacent End Point

  • Can Read

  • Can Write

Description#

The Use Adjacent End Point property of the Edge Collider 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("Edge Collider 2D Use Adjacent End Point")]
    [Category("Physics 2D/Collider 2D/Edge Collider 2D/Use Adjacent End Point")]
    [Description("The Use Adjacent End Point property of the Edge Collider 2D component")]
    
    [Image(typeof(IconLineStartEnd), ColorTheme.Type.Lime, typeof(Badge2D))]
    [Keywords("Physics, 2D")]
    
    [Serializable]
    public class GenTypeBool_EdgeCollider2D_UseAdjacentEndPoint : TypeBool
    {
        [SerializeField] private GetGameObject m_EdgeCollider2D = new GetGameObject(
            new GenTypeGameObject_EdgeCollider2D()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_EdgeCollider2D.GetPreview(source);
            if (instance == null) return default;
            
            EdgeCollider2D component = instance.GetComponent<EdgeCollider2D>();
            return component != null ? component.useAdjacentEndPoint : default;
        }
        
        public override bool Get(Args args)
        {
            EdgeCollider2D instance = this.m_EdgeCollider2D.Get<EdgeCollider2D>(args);
            return instance != null
                ? instance.useAdjacentEndPoint
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            EdgeCollider2D component = this.m_EdgeCollider2D.Get<EdgeCollider2D>(args);
            if (component != null) component.useAdjacentEndPoint = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_EdgeCollider2D} Use Adjacent End Point";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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