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

# Get Ignore Layer Collision

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

## Description

Compares the Get Ignore Layer Collision static method of Physics 2D class to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Layer 1 |  |
| Layer 2 |  |

## 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
{
    [Title("Get Ignore Layer Collision")]
    [Category("Physics 2D/Physics 2D/Get Ignore Layer Collision")]
    [Description("Compares the Get Ignore Layer Collision static method of Physics 2D class to another value")]

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

    [Parameter("Layer 1")]
    [Parameter("Layer 2")]

    [Serializable]
    public class GenConditionBool_Physics2D_CheckGetIgnoreLayerCollision_2 : Condition
    {
        [SerializeField] private GetInteger m_Layer1 = new GetInteger();

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

        protected override string GetTitle(GameObject source)
        {
            string className = TextUtils.ThemeAsKeyword("Physics 2D");
            string method = TextUtils.ThemeAsKeyword("Get Ignore Layer Collision");
            return $"{className} {method} ({this.m_Layer1}, {this.m_Layer2})";
        }

        protected override bool Run(Args args)
        {
            bool value = Physics2D.GetIgnoreLayerCollision(
                (int) this.m_Layer1.Get(args),
                (int) this.m_Layer2.Get(args)
            );

            return value;
        }
    }
}
```

