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

# Edge Collider 2D Reset

[Physics 2D](../../index.md) / [Collider 2D](../index.md) / [Edge Collider 2D](index.md) / **Edge Collider 2D Reset**

## Description

Executes the Reset method on the Edge Collider 2D component

## 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("Edge Collider 2D Reset")]
    [Category("Physics 2D/Collider 2D/Edge Collider 2D/Reset")]
    [Description("Executes the Reset method on the Edge Collider 2D component")]

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

    [Serializable]
    public class GenInstructionEdgeCollider2D_Reset_0 : Instruction
    {
        [SerializeField] private GetGameObject m_EdgeCollider2D = new GetGameObject(
            new GenTypeGameObject_EdgeCollider2D()
        );

        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Reset");
            return $"{this.m_EdgeCollider2D} {method}";
        }

        protected override Awaitable Run(Args args)
        {
            EdgeCollider2D component = this.m_EdgeCollider2D.Get<EdgeCollider2D>(args);
            if (component == null) return Done;

            component.Reset();

            return Done;
        }
    }
}
```

