Unclaimed Package Is this your package? Claim it to unlock full analytics and manage your listing.
Claim This Package

Install via UPM

Add to Unity Package Manager using this URL

https://www.pkglnk.dev/track/back-button-stack.git

README

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.
Total Installs
0
Last 30 days
Unique IPs
0
Approximate users

Installs Over Time

Operating Systems

No data yet

Top Countries

No data yet

Git Versions

No data yet

Embed Install Badge

Add an install count badge to your README

Style
Preview
pkglnk installs badge
Markdown
[![pkglnk installs](https://www.pkglnk.dev/badge/back-button-stack.svg?style=pkglnk)](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?style=pkglnk" alt="pkglnk installs"></a>

Comments

No comments yet. Be the first!