---
tags:
    - "Button"
    - "Up"
    - "Just"
    - "Ended"
---

# Gamepad Released this Frame

[Input](index.md) / **Gamepad Released this Frame**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns true the frame the specified Gamepad button is released

## Parameters

| Name | Description |
| :--- | :---------- |
| Button | The Gamepad button that is checked |

## Code

```cs
using System;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.LowLevel;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Inline(nameof(m_Button))]

    [Title("Gamepad Released this Frame")]
    [Category("Input/Gamepad Released this Frame")]

    [Description("Returns true the frame the specified Gamepad button is released")]
    [Image(typeof(IconGamepad), ColorTheme.Type.Blue, typeof(BadgeArrowUp))]

    [Parameter("Button", "The Gamepad button that is checked")]

    [Keywords("Button", "Up", "Just", "Ended")]

    [Serializable]
    public class TypeBoolInputGamepadReleaseThisFrame : TypeBool
    {
        [SerializeField] private GamepadButton m_Button = GamepadButton.South;

        public override bool Get(Args args)
        {
            Gamepad gamepad = Gamepad.current;
            return gamepad != null && gamepad[this.m_Button].wasReleasedThisFrame;
        }

        public override string ToString()
        {
            return $"Released {this.m_Button}";
        }

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

```

