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/atarumatsudaira-unicon.git?path=Packages/com.mattun.unicon

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## Installation

Add **Unicon** 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/atarumatsudaira-unicon.git?path=Packages%2Fcom.mattun.unicon
```

[![pkglnk](https://www.pkglnk.dev/badge/atarumatsudaira-unicon.svg?style=pkglnk)](https://www.pkglnk.dev/pkg/atarumatsudaira-unicon)

README

Unicon

English | ζ—₯本θͺž

Customize Unity Editor dock/taskbar icon on macOS and Windows. Easily distinguish between multiple Unity instances running in parallel.

Unity Version License

η”»ι’εŽιŒ² 2025-12-09 22 04 26

Features

  • Custom Image Icon: Use any image file as your dock icon
  • Color Overlay: Apply a color overlay to the Unity icon
  • Auto Color Generation: Automatically generate a unique color from project name
  • Badge Text: Display custom text on the icon (e.g., "Dev", "Win", "1")
  • Auto Apply: Automatically applies icon on editor startup and script reload
  • Preferences UI: Easy configuration via Edit > Preferences

Requirements

  • Platform:
    • macOS 10.13 or later
    • Windows 7 or later
  • Unity: 2020.3 or later
  • Architecture:
    • macOS: x86_64, arm64 (Apple Silicon)
    • Windows: x86_64

Installation

Via OpenUPM (Recommended)

openupm add com.mattun.unicon

Or add the scoped registry manually to your Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "package.openupm.com",
      "url": "https://package.openupm.com",
      "scopes": [
        "com.mattun.unicon"
      ]
    }
  ],
  "dependencies": {
    "com.mattun.unicon": "1.2.4"
  }
}

Via Git URL (Unity Package Manager)

  1. Open Window > Package Manager
  2. Click + button and select Add package from git URL...
  3. Enter: https://github.com/AtaruMatsudaira/Unicon.git?path=Packages/com.mattun.unicon

Via manifest.json

Add the following to your Packages/manifest.json:

{
  "dependencies": {
    "com.mattun.unicon": "https://github.com/AtaruMatsudaira/Unicon.git?path=Packages/com.mattun.unicon"
  }
}

Usage

Quick Start

  1. Open Edit > Preferences > Unicon
  2. Enable "Enable Custom Dock Icon" toggle
  3. Customize as needed:
    • Custom Image: Click "Browse" to select an image file
    • Color Overlay: Disable "Use Auto Color" and pick a color
    • Badge Text: Enter text to display on the icon (e.g., "Dev", "1")

Auto Color

By default, the package generates a unique color based on your project name. This is useful when you want to quickly distinguish between projects without setting custom icons.

Settings

Settings are saved in UserSettings/DockIconSettings.json and automatically excluded from version control.

How It Works

This package uses native plugins to change the dock/taskbar icon at runtime:

  • macOS: Uses UniconPlugin.bundle (Swift) that leverages NSApplication.applicationIconImage API
  • Windows: Uses UniconPluginForWindows.dll (C++) that leverages Windows Shell API to change the taskbar icon

Architecture

macOS

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Unity Editor   β”‚
β”‚   (C# Scripts)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ P/Invoke
         ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ DockIconPlugin  β”‚
β”‚    (Swift)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ NSApplication API
         ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   macOS Dock    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Windows

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Unity Editor       β”‚
β”‚    (C# Scripts)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ P/Invoke
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ DockIconPluginFor    β”‚
β”‚      Windows (C++)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚ Windows Shell API
           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Windows Taskbar     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

API Reference

UniconSettings

// Enable/disable custom dock icon
UniconSettings.Enabled = true;

// Set custom image path
UniconSettings.IconPath = "/path/to/icon.png";

// Enable auto color generation
UniconSettings.UseAutoColor = true;

// Set custom overlay color
UniconSettings.OverlayColor = new Color(1f, 0.5f, 0f, 0.3f);

// Set badge text
UniconSettings.BadgeText = "Dev";
UniconSettings.BadgeTextColor = Color.white;
UniconSettings.BadgeTextFontSizeMultiplier = 1.0f;

// Save settings
UniconSettings.Save();

Troubleshooting

Plugin not loading

macOS

  1. Check if UniconPlugin.bundle exists in Packages/com.mattun.unicon/Plugins/Editor/macOS/
  2. Restart Unity Editor
  3. Check Console for error messages

Windows

  1. Check if UniconPluginForWindows.dll exists in Packages/com.mattun.unicon/Plugins/Editor/Windows/
  2. Restart Unity Editor
  3. Check Console for error messages

Icon not changing

  1. This feature is currently supported on macOS and Windows only (Linux not supported)
  2. Make sure "Enable Custom Dock Icon" is toggled ON
  3. Click "Apply Current Settings" button in Preferences

Image not loading

  • Only absolute paths are supported (relative paths won't work)
  • Use NSImage-compatible formats: PNG, JPG, ICNS, etc.

Building the Plugins

If you need to rebuild the native plugins:

macOS Plugin

cd path/to/Plugins/macOS/UniconPlugin
xcodebuild -project UniconPlugin.xcodeproj \
  -scheme UniconPlugin \
  -configuration Release \
  -arch x86_64 -arch arm64 \
  ONLY_ACTIVE_ARCH=NO \
  BUILD_DIR=./build \
  clean build

# Copy to package
cp -r build/Release/UniconPlugin.bundle \
  path/to/Packages/com.mattun.unicon/Plugins/Editor/macOS/

Windows Plugin

cd path/to/Plugins/Windows/UniconPlugin
mkdir build && cd build
cmake ..
cmake --build . --config Release

# Copy to package
cp Release/UniconPluginForWindows.dll \
  path/to/Packages/com.mattun.unicon/Plugins/Editor/Windows/

License

MIT License

Copyright (c) 2025 mattun

References

Comments

No comments yet. Be the first!