API v1 checking… · p50 — · 0 installs/hr
v0.10.0
Package
View on GitHub
gilzoide
13 0

Manage ESC/Android Back button events with a stack-based system that ensures only the topmost object handles input. Inherit from ABackButtonHandler for automatic stack management via OnEnable/OnDisable, or implement IBackButtonHandler for pure C# classes. Includes a custom inspector for debugging the active stack during play mode.

Install via Unity Package Manager

Add to Unity Package Manager

Paste this URL into Unity's Window › Package Manager › + › Add package from git URL, or click Install.

git https://www.pkglnk.dev/back-button-stack.git
Package ID com.gilzoide.back-button-stack · Updated May 6, 2026
Install 0

README

Rendered from GitHub

Back Button Stack

openupm

Easily manage a stack of objects that respond to the ESC button / Android Back button in Unity, so that only the top object handles the event.

Check out the Popup Stack sample scene for some usage example.

Features

  • Only the last object in the stack will be called when the ESC/Back button is pressed.
  • Inherit ABackButtonHandler to have scripts that handle the ESC/Back button be inserted/removed from the singleton stack automatically in their OnEnable / OnDisable methods.
  • Supports pure C# classes as well, just implement the IBackButtonHandler interface and call AddToBackButtonStack and RemoveFromBackButtonStack to add / remove it from the singleton stack.
  • Custom inspector for debugging which objects are currently in the stack, just select the BackButtonStack object in the DontDestroyOnLoad scene while in Play Mode.

How to install

Either:

  • Use the openupm registry and install this package using the openupm-cli:
    openupm add com.gilzoide.back-button-stack
    
  • Install using the Unity Package Manager with the following URL:
    https://github.com/gilzoide/unity-back-button-stack.git#1.0.0
    
  • Clone this repository or download a snapshot of it directly inside your project's Assets or Packages folder.
Versions 0

No versions tracked yet.

Dependencies 0

No dependencies.

Changelog 0 releases

No changelog entries yet. Run the admin Changelog & Version Scanner to pull from the repository's CHANGELOG.md.

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## Installation

Add **Back Button Stack** to your Unity project via Package Manager:

1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/back-button-stack.git
```

[![pkglnk](https://www.pkglnk.dev/badge/back-button-stack.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/back-button-stack)
Embed badge README snippet
Markdown
[![pkglnk installs](https://www.pkglnk.dev/badge/back-button-stack.svg)](https://www.pkglnk.dev/pkg/back-button-stack)
HTML
<a href="https://www.pkglnk.dev/pkg/back-button-stack"><img src="https://www.pkglnk.dev/badge/back-button-stack.svg" alt="pkglnk installs"></a>
URL
https://www.pkglnk.dev/badge/back-button-stack.svg

Comments

No comments yet. Be the first!