Documentation

Shortcuts Manager

App shortcuts for Unity: the long-press menu on Android and Home Screen quick actions on iOS, with a launch event that tells your game which one the player tapped.

  • Version 2.0.0
  • Unity 6000.0+
  • Platforms Android, iOS
  • Updated Nov 4, 2026
Shortcuts Manager

Overview

Shortcuts Manager adds app shortcuts to your Unity game: the menu the player gets by long-pressing your app icon. On Android these are dynamic and pinned app shortcuts; on iOS, Home Screen quick actions. Each shortcut opens your game, and the ShortcutLaunched event tells your code which one the player tapped, so you can open the store, the daily reward or the latest event straight away.

On Android a shortcut can also run your own Intent: open a web page, write an email, or open the game with your own extras. Nothing needs to be added to your manifest, Gradle files or Info.plist.

Requirements

ItemVersionNotes
Unity6000.0+Android and/or iOS build support installed
com.unity.ugui2.0+The demo's UI only
Android7.1+ launcherApp shortcuts need Android 7.1 (API 25); pinning needs a launcher that supports it (IsRequestPinShortcutSupported()).
iOS13+ for iconsQuick actions work on every supported iOS; SF Symbol icons need iOS 13.

Quick start

  1. Import the package Everything lands in Assets/hardarcore/Shortcuts.
  2. Add a shortcut Create a Shortcut with an id and a label, and call ShortcutsManager.Instance.AddDynamicShortcut(shortcut). Shortcuts stay until you remove them, so add or refresh them when the game starts.
  3. Handle the launch Subscribe to ShortcutsManager.Instance.ShortcutLaunched and open the screen that matches the id.
GameShortcuts.cs
using Hardartcore.Shortcuts;
using UnityEngine;

public class GameShortcuts : MonoBehaviour
{
    private void Start()
    {
        var store = new Shortcut("store", "Store", "Today's offers", "hc_shortcut_store", 0)
        {
            IosSymbol = "cart.fill"
        };
        ShortcutsManager.Instance.AddDynamicShortcut(store);

        ShortcutsManager.Instance.ShortcutLaunched += OpenScreen;
        // The game may have started from a shortcut before this script subscribed.
        if (ShortcutsManager.Instance.LaunchShortcutId != null) OpenScreen(ShortcutsManager.Instance.LaunchShortcutId);
    }

    private void OpenScreen(string shortcutId)
    {
        if (shortcutId == "store") { /* show the store */ }
        ShortcutsManager.Instance.ReportShortcutUsed(shortcutId);
    }
}
In the Editor

The shortcuts are kept in memory in the Editor and on other platforms: you can add, update, list and remove them, so your UI works. The launch event only fires on a device.

The demo

Open Demo/ShortcutsDemo and press Play. The left card shows the shortcut menu as the launcher would, built from GetShortcuts(); the buttons add the game shortcuts (Profile, Daily rewards, Events, Store), a website and an email shortcut, pin the Store shortcut, update the Daily rewards labels and remove everything. On a device, open the game from a shortcut and the yellow chip shows which one. The layout adapts to portrait and landscape.

API reference

Shortcut

Id
Unique id. ShortcutLaunched reports it; adding a shortcut with an existing id replaces it.
ShortLabel
The title. Keep it short: launchers show about 10 characters.
LongLabel
Android: shown when there is room. iOS: the subtitle.
IconName
Android: the name of a drawable resource (see Icons).
IconPath
Android: a PNG or JPG file to use as the icon, e.g. made at runtime in Application.persistentDataPath. Wins over IconName.
IosSymbol
iOS: an SF Symbol name for the icon, such as "cart.fill".
Rank
Position in the menu, 0 next to the icon. When the menu is full, the shortcut with the highest rank makes room.

ShortcutsManager

ShortcutsManager.Instance works from anywhere: it creates itself when no scene has one, and survives scene loads.

event ShortcutLaunched (string id)
The player opened or resumed the game with a shortcut.
LaunchShortcutId
The id of the last shortcut that opened the game, or null.
AddDynamicShortcut(shortcut)
Adds a shortcut that opens the game, or replaces the one with the same id.
AddDynamicShortcut(shortcut, intent)
Android: a shortcut that runs your Intent (see Intents). iOS: as above.
UpdateShortcut(shortcut)
Updates the labels, icon and rank of the shortcut with the same id. Its action stays. UpdateShortcuts(shortcuts) does several.
GetShortcuts()
All dynamic shortcuts, by rank. Android does not give icons back.
GetShortcutById(id), GetDynamicShortcutsSize()
One shortcut, or how many there are.
RemoveShortcutById(id), RemoveShortcutsById(ids), RemoveAllDynamicShortcuts()
Removes shortcuts.
GetMaxShortcutCountPerActivity()
How many shortcuts the launcher shows. iOS: 4.
ReportShortcutUsed(id)
Android Tells the launcher a shortcut was used, so it can suggest it. Call it when the player opens the shortcut or does the same thing in the game.
RequestPinShortcut(shortcut, intent), RequestPinShortcutById(id)
Android Asks the launcher to pin a shortcut to the home screen; the launcher asks the player first. intent may be null. Check IsRequestPinShortcutSupported().
DisableShortcutById(id, message), EnableShortcutById(id)
Android Disables a shortcut (a pinned copy shows message when tapped) or enables it again.
GetIconMaxWidth(), GetIconMaxHeight()
Android The icon size the launcher uses, in pixels.
RemoveLongLivedShortcut(id), RemoveLongLivedShortcuts(ids)
Android Removes long-lived (sharing) shortcuts.
GetCurrentAndroidActivity(), SetIntent(intent)
Android The running activity, and a way to replace its intent after reading your own extras.

Intents (Android)

Intent wraps android.content.Intent: actions, data, flags, class names and typed extras, with helpers for common shortcuts. Build Intents only on Android (inside #if UNITY_ANDROID && !UNITY_EDITOR).

Intents.cs
var website = new Shortcut("website", "Website", "Open hardartcore.com", "hc_shortcut_web", 0);
ShortcutsManager.Instance.AddDynamicShortcut(website, Intent.CreateOpenUrlIntent("https://hardartcore.com"));

var support = new Shortcut("support", "Support", "Email the team", "hc_shortcut_mail", 1);
ShortcutsManager.Instance.AddDynamicShortcut(support,
    Intent.CreateEmailIntent(new[] { "support@example.com" }, "Hello"));

// Your own: open the game with extras, read them back with Intent.GetIntent(activity).
var intent = new Intent().SetAction(IntentActions.ACTION_VIEW).PutExtra("level", 12);

Every shortcut's intent carries its id, so ShortcutLaunched also fires for shortcuts with your own Intents when they open the game. A shortcut without an Intent opens the game's own activity, whichever Unity runs (UnityPlayerActivity or UnityPlayerGameActivity).

Icons

Android, drawable
Put PNGs in an Android library folder and use the file name (without extension) as IconName. Demo/ShortcutIcons.androidlib is an example: copy it outside the package, rename it and its namespace in build.gradle, and replace the PNGs. Give your icons a prefix so they never clash with other resources. Android recommends a 48dp icon (192 px works for every screen).
Android, file
Set IconPath to a PNG or JPG on the device, e.g. a texture you saved with EncodeToPNG().
iOS
Set IosSymbol to an SF Symbol name (Apple's SF Symbols app lists them).

How it works

Android

Plugins/Android/Shortcuts.androidlib holds the Java side, built on ShortcutManagerCompat from androidx.core:core:1.9.0 (downloaded by Gradle). New shortcuts are pushed with pushDynamicShortcut, so a full menu drops its highest-ranked shortcut instead of failing. The shortcut id travels as an intent extra and is cleared once read, so returning from Recents does not report it twice. ProGuard keep rules are included.

iOS

Plugins/iOS/Shortcuts.mm sets UIApplication.shortcutItems and adds application:performActionForShortcutItem:completionHandler: to Unity's app controller, plus a launch options check for cold starts. iOS shows up to four quick actions; there is no pinning, no Intents and no enable/disable, so those calls do nothing there.

Folder layout

Assets/hardarcore/Shortcuts/
├── Documentation.html                 this documentation
├── Scripts/                           ShortcutsManager, Shortcut, Intent and its constants
│   └── Editor/                        Help menu items
├── Plugins/
│   ├── Android/Shortcuts.androidlib/  build.gradle, ProGuard rules, Java (src/main)
│   └── iOS/Shortcuts.mm               quick actions bridge
└── Demo/                              ShortcutsDemo scene, its scripts, ShortcutIcons.androidlib, Nunito, icons

Upgrading from 1.x

  1. Delete the old libraries Remove Plugins/Android/Shortcuts/shortcuts-lib-release.aar, Editor/AndroidDependencies.xml and Assets/IconResources if they are still in the project: importing an update does not delete files.
  2. Move your icons Your drawables lived in the IconResources AAR: put them in an Android library folder (see Icons).
  3. Prefab optional The ShortcutsManager prefab is gone; ShortcutsManager.Instance creates itself. Scenes that still have the component keep working.
  4. Launch handling Reading your own extras still works; ShortcutLaunched is simpler and works on iOS too.

Troubleshooting

The shortcut has no icon
Android: no drawable with that IconName (check logcat for "No drawable resource named"), or the IconPath file is missing. iOS: the SF Symbol name is wrong, or the device runs iOS 12.
ShortcutLaunched does not fire
It only fires on a device. Subscribe early, and also check LaunchShortcutId for a launch that happened before you subscribed.
Pinning does nothing
The launcher does not support it (IsRequestPinShortcutSupported()), or the player declined.
Duplicate class androidx.core...
Another plugin copied androidx.core AAR files into Assets/Plugins/Android (External Dependency Manager without Gradle templates). Turn on EDM's Patch mainTemplate.gradle option and resolve again.

Third-party notices

The demo includes two third-party components. Everything else in the package is original work by HardArtcore.

ComponentLocationLicense
Nunito font
Copyright 2014 The Nunito Project Authors (github.com/googlefonts/nunito)
Demo/UI/Fonts/SIL Open Font License 1.1
Material Symbols icons
Copyright Google LLC (github.com/google/material-design-icons)
Demo/UI/Icons/, Demo/ShortcutIcons.androidlibApache License 2.0

The full licence texts ship in the package's Documentation.html, and online: SIL Open Font License 1.1, Apache License 2.0.

Release notes

2.0.0

  • iOS support: Home Screen quick actions with SF Symbol icons.
  • ShortcutLaunched event and LaunchShortcutId: which shortcut opened the game, on Android and iOS.
  • AddDynamicShortcut(shortcut) without an Intent opens the game, including UnityPlayerGameActivity.
  • Icons from PNG files (Shortcut.IconPath), and a full menu makes room by rank instead of failing.
  • Shortcuts are simulated in the Editor; ShortcutsManager.Instance creates itself.
  • Zero setup on Android: the Java library is an Android library folder with its androidx dependency and ProGuard rules. No AARs, no Gradle templates, no External Dependency Manager.
  • A new single-scene demo in portrait and landscape. Unity 6 or newer.

1.1

  • Small improvements in code and documentation; namespace matches the other packages.

1.0

  • First release.

Need help?

Questions, bug reports or feature requests: I usually reply within a day.

support@hardartcore.com

Last updated November 4, 2026.