---
tags:
    - "Physics, 2D"
---

# Is Touching

[Physics 2D](index.md) / **Is Touching** Collider1, Collider2

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

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

## Code

```cs
// <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")]
    [Category("Physics 2D/Is Touching", "Collider1, Collider2")]
    [Description("Returns the execution of Is Touching static method on the Physics 2D class")]

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

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

        [SerializeField] private GetGameObject m_Collider2 = new GetGameObject();

        public override bool Get(Args args)
        {
            bool value = (bool) Physics2D.IsTouching(
                (Collider2D) this.m_Collider1.Get<Collider2D>(args),
                (Collider2D) this.m_Collider2.Get<Collider2D>(args)
            );
            return value;
        }

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

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

