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

Is Touching Layers#

Physics 2D / Is Touching Layers Collider, LayerMask

  • Can Read

  • Cannot Write

Description#

Returns the execution of Is Touching Layers static method on the Physics 2D class

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]

    [Title("Is Touching Layers")]
    [Category("Physics 2D/Is Touching Layers", "Collider, LayerMask")]
    [Description("Returns the execution of Is Touching Layers static method on the Physics 2D class")]

    [Image(typeof(IconPhysics), ColorTheme.Type.Lime, typeof(Badge2D))]
    [Keywords("Physics, 2D")]

    [Serializable]
    public class GenTypeBool_Physics2D_IsTouchingLayers_2_Collider2DCollider_IntLayerMask : TypeBool
    {
        [SerializeField] private GetGameObject m_Collider = new GetGameObject();

        [SerializeField] private GetInteger m_LayerMask = new GetInteger();

        public override bool Get(Args args)
        {
            bool value = (bool) Physics2D.IsTouchingLayers(
                (Collider2D) this.m_Collider.Get<Collider2D>(args),
                (int) this.m_LayerMask.Get(args)
            );
            return value;
        }

        public override string ToString()
        {
            return $"Physics 2D Is Touching Layers ({this.m_Collider}, {this.m_LayerMask})";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.