https://github.com/haoming02/unity-system-tray
A simple script to add an interactable System Tray Icon to the for Unity applications
https://github.com/haoming02/unity-system-tray
unity win32
Last synced: 9 months ago
JSON representation
A simple script to add an interactable System Tray Icon to the for Unity applications
- Host: GitHub
- URL: https://github.com/haoming02/unity-system-tray
- Owner: Haoming02
- License: mit
- Created: 2024-06-21T03:36:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T16:09:01.000Z (about 1 year ago)
- Last Synced: 2025-05-13T12:55:39.355Z (about 1 year ago)
- Topics: unity, win32
- Language: C#
- Homepage:
- Size: 15.6 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity System Tray
A simple script that adds a system tray (notificaion) icon for Unity applications
> [!Important]
> Since the script uses functions from `user32.dll`, it is only usable on **Windows** systems
## How to Use
- Call the `TrayIcon.Init` function:
- **appName:** Just an internal `string`, will not be visible
- **tooltip:** Shows up when you hover the icon
- **iconTexture:** Icon texture :skull:
- **actions:** A `List` of `string`, `Action` pairs
- For regular strings, it will be shown as an option in the menu when right-clicking the icon
- Use `TrayIcon.LEFT_CLICK` for when left-clicking the icon directly
- Use `TrayIcon.SEPARATOR` to add a divider in the menu
- Call `TrayIcon.ShowBalloonTip` to trigger a notification
> [!Tip]
> Check out the included Demo scene
Special Thanks: Gemini 2.5 Pro