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/uicorner.git

README Markdown

Copy this to your project's README.md

Style
Preview
pkglnk installs badge
## Installation

Add **UI Corner** 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/uicorner.git
```

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

README

UICorner

GPU-accelerated rounded and chamfered corners for Unity UI elements.

Installation

Via OpenUPM (Recommended)

Install via OpenUPM CLI:

openupm add com.iraklichkuaseli.uicorner

Or add the package via OpenUPM scoped registry in Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "OpenUPM",
      "url": "https://package.openupm.com",
      "scopes": ["com.iraklichkuaseli"]
    }
  ],
  "dependencies": {
    "com.iraklichkuaseli.uicorner": "1.1.1"
  }
}

Via Git URL

Add this line to your Packages/manifest.json:

{
  "dependencies": {
    "com.iraklichkuaseli.uicorner": "https://github.com/irakli/ui-corner.git"
  }
}

Or install via Package Manager:

  1. Open Window → Package Manager
  2. Click the + button
  3. Select "Add package from git URL"
  4. Enter: https://github.com/irakli/ui-corner.git

Requirements

  • Unity 2021.3 or later

Features

  • Dual Corner Styles: Rounded (circular arc) and Chamfered (45-degree diagonal cut)
  • Per-Corner Control: Mix and match styles independently for each corner
  • High Performance: 2.5-3.1Ɨ faster than comparable solutions
    • Single quadrant selection (vs calculating all 4 corners)
    • Minimal GPU operations (1 sqrt vs 6+ in alternatives)
    • No trigonometric functions
  • Responsive Inspector: Clean UI that works on narrow inspector windows
  • Production Ready: Automatic size clamping prevents geometry breakdown

Usage

  1. Add UICorner component to any UI Image
  2. Configure each corner independently:
    • Style: Rounded or Chamfered
    • Size: Corner radius (auto-clamped to prevent overlap)

Technical Details

Implementation: Signed Distance Field (SDF) rendering using Inigo Quilez's quadrant-selection technique

Compatibility: Works with Unity UI Mask system and all standard Image features

Integration API

UICorner exposes a PropertiesChanged event that fires whenever corner properties (radius or style) change. This allows you to react to changes for animations, shadow updates, or other visual effects.

var uiCorner = GetComponent<UICorner>();
uiCorner.PropertiesChanged += () => {
    // React to corner property changes
};

Package Structure

com.iraklichkuaseli.uicorner/
ā”œā”€ā”€ package.json             # UPM package manifest
ā”œā”€ā”€ README.md                # This file
ā”œā”€ā”€ CHANGELOG.md             # Version history
ā”œā”€ā”€ LICENSE.md               # MIT License
ā”œā”€ā”€ Runtime/
│   ā”œā”€ā”€ UICorner.cs          # Main component
│   ā”œā”€ā”€ IrakliChkuaseli.UICorner.asmdef
│   └── Shaders/
│       ā”œā”€ā”€ UICorner.shader  # Main shader
│       └── UICornerSDF.cginc # SDF calculations
ā”œā”€ā”€ Editor/
│   ā”œā”€ā”€ UICornerEditor.cs    # Custom inspector
│   └── IrakliChkuaseli.UICorner.Editor.asmdef
ā”œā”€ā”€ Icons/
│   └── UICornerIcon.png     # Component icon
└── Tests/
    ā”œā”€ā”€ Editor/              # Editor tests (placeholder)
    └── Runtime/             # Runtime tests (placeholder)

Credits

SDF technique based on Inigo Quilez's 2D distance functions

Comments

No comments yet. Be the first!