uGUI Sector Custom Graphic GitHub

uGUI Custom Graphic that draws an oval sector

Available at GitHub

Features

  • 1 script
  • no custom shaders
  • correct input handling
  • SpriteBorder support
  • 9-slice support
  • SpriteAtlas support
  • pixelPerUnitMultiplier support
  • Anchors for other transforms, including resizing to squeeze content into a sector
  • Sprite UV-by radius and tile by RectTransform
  • free pivot, or generated in the center of the sector
  • gradients
  • nested sectors can stick to parent
  • offset by angle
  • pixel offset
  • performance-wise

Known Issues

  • Tiled UV not support SpriteAtlas

Usage Example
9783747--1403463--324217079-93fcd863-e140-4f84-a7c0-42a4fd5edad9.gif

Inspector Preview
9783747--1403454--324212862-539564ea-c2c2-4ba5-9535-e5be0e7239e2.jpg

9783747--1403460--324212918-c655b6f4-bbe6-4ef6-bbd6-a4feae6d4978.jpg

1 Like

9 slice with border usage | change count | content resize custom Anchor
9783756--1403466--324217072-e8dcb7cc-2f75-4cc4-8293-9ac657933ba0.gif

Custom Anchors
9783756--1403469--IMG_20240421_095120_934.jpg

Gradient Degree mode | Tile Sprite UV


Gradient Degree Sector mode for color, radius mode for alpha

Wireframe

Final Result and used sprite, fading resized with Sector.Settings.pixelPerUnitMultiplier

9783765--1403481--IMG_20240421_095120_753.jpg 9783765--1403484--IMG_20240421_095121_569.jpg 9783765--1403487--IMG_20240421_095121_445.jpg