Skip to content

Repository files navigation

uGUI Extensions

Reusable uGUI extension components for Unity 6 and newer.

This package focuses on small, project-agnostic UI components that improve common Unity UI workflows without adding gameplay-specific assumptions or global runtime systems.

Requirements

  • Unity 6.0 or newer
  • Unity uGUI package (com.unity.ugui)

Installation

Install with Unity Package Manager using the Git URL:

https://github.com/nelu572/Unity-UI-Extensions.git

In Unity:

  1. Open Window > Package Manager.
  2. Click +.
  3. Choose Install package from git URL....
  4. Enter the Git URL above.

Components

RoundedImage

RoundedImage is a uGUI image component for drawing rounded UI rectangles without requiring texture assets.

Use it like a regular Image component:

  1. Add RoundedImage to a UI GameObject.
  2. Assign a Sprite if needed.
  3. Set the Color and Radius in the Inspector.

The radius is expressed in UI pixel units and updates in edit mode when the RectTransform or Inspector value changes.

Implementation notes:

  • Inherits from UnityEngine.UI.Image.
  • Uses a shared SDF-based UI shader for anti-aliased rounded clipping.
  • Encodes per-element size and radius in UI vertex channels.
  • Enables TexCoord1 and TexCoord2 on the owning Canvas when needed.

UIGradient

UIGradient is a reusable linear gradient effect for uGUI Graphic components.

  1. Add UIGradient to a GameObject with a Graphic.
  2. Set Start Color, End Color, and Angle.

The gradient multiplies the existing vertex colors, so the base Graphic color and alpha still participate in the final result.

BetterOutline

BetterOutline is a simple adjustable outline effect for uGUI Graphic components.

  1. Add BetterOutline to a GameObject with a Graphic.
  2. Set Color, Width, and Use Graphic Alpha.

The effect creates outline geometry around the source graphic and keeps the original graphic drawn above the outline.

Example

Create a rounded gradient button:

  1. Create a UI GameObject.
  2. Add RoundedImage.
  3. Set Radius to 12.
  4. Add UIGradient.
  5. Set the gradient colors and angle.

Add an outline:

  1. Add BetterOutline to the same GameObject.
  2. Set Width to 2.
  3. Set the outline color.

Currently Supported

  • Rounded UI image rendering
  • Linear UI gradient
  • Adjustable UI outline

Future components such as rounded masks, shadows, fades, transitions, safe area helpers, and editor creation menus are intentionally not included in 0.1.0.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages