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

Overlap Circle#

Physics 2D / Overlap Circle Point, Radius, LayerMask, MinDepth, MaxDepth

  • Can Read

  • Cannot Write

Description#

Returns the execution of Overlap Circle 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("Overlap Circle")]
    [Category("Physics 2D/Overlap Circle", "Point, Radius, LayerMask, MinDepth, MaxDepth")]
    [Description("Returns the execution of Overlap Circle static method on the Physics 2D class")]

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

    [Serializable]
    public class GenTypeGameObject_Physics2D_OverlapCircle_5_Vector2Point_FloatRadius_IntLayerMask_FloatMinDepth_FloatMaxDepth : TypeGameObject
    {
        [SerializeField] private GetVector2 m_Point = new GetVector2();

        [SerializeField] private GetNumber m_Radius = new GetNumber();

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

        [SerializeField] private GetNumber m_MinDepth = new GetNumber();

        [SerializeField] private GetNumber m_MaxDepth = new GetNumber();

        public override GameObject Get(Args args)
        {
            Collider2D value = (Collider2D) Physics2D.OverlapCircle(
                (Vector2) this.m_Point.Get(args),
                (float) this.m_Radius.Get(args),
                (int) this.m_LayerMask.Get(args),
                (float) this.m_MinDepth.Get(args),
                (float) this.m_MaxDepth.Get(args)
            );
            return value != null ? value.gameObject : null;
        }

        public override U Get<U>(Args args)
        {
            if (typeof(U) == typeof(Physics2D))
            {
                return Physics2D.OverlapCircle(
                    (Vector2) this.m_Point.Get(args),
                    (float) this.m_Radius.Get(args),
                    (int) this.m_LayerMask.Get(args),
                    (float) this.m_MinDepth.Get(args),
                    (float) this.m_MaxDepth.Get(args)
                ) as U;
            }

            return base.Get<U>(args);
        }

        public override string ToString()
        {
            return $"Physics 2D Overlap Circle ({this.m_Point}, {this.m_Radius}, {this.m_LayerMask}, {this.m_MinDepth}, {this.m_MaxDepth})";
        }

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