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

# Get Layer Collision Mask

[Physics 2D](index.md) / **Get Layer Collision Mask**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns the execution of Get Layer Collision Mask 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("Get Layer Collision Mask")]
    [Category("Physics 2D/Get Layer Collision Mask")]
    [Description("Returns the execution of Get Layer Collision Mask static method on the Physics 2D class")]

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

    [Serializable]
    public class GenTypeInteger_Physics2D_GetLayerCollisionMask_1 : TypeNumber
    {
        [SerializeField] private GetInteger m_Layer = new GetInteger();

        public override double Get(Args args)
        {
            double value = (double) Physics2D.GetLayerCollisionMask(
                (int) this.m_Layer.Get(args)
            );
            return value;
        }

        public override string ToString()
        {
            return $"Physics 2D Get Layer Collision Mask ({this.m_Layer})";
        }

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

