Skip to content

mitay-walle/com.mitay-walle.ui-graphic-sector

Repository files navigation

Unity3d uGUI Custom Graphic that draws an oval sector

Features

  • 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
  • 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

  • automatic navigation not always recognize Selectable in selection wheel, cause it's RectTransforms placed identicaly. Use explicit navigation instead
  • 9-sliced sprites 'shrink' to center, cause uv calculated per-degree
  • Tiled mode not support SpriteAtlas, only Single-texture sprites, by design. Cause tiling achievet through uv repeating, no blowing up geometry as UI.Image.Tiled use

Usage Example | 9-slice sprite

sector_resolution sector_pixelPerUnitMultiplier sector_inputRaycasting sector_inputRaycasting2 sector_count photo_2024-04-21_03-00-49 photo_2024-04-21_03-00-45 photo_2024-04-21_03-00-42 photo_2024-04-21_03-00-55 photo_2024-04-21_03-00-51 photo_2024-04-21_03-01-00 photo_2024-04-21_03-01-03 photo_2024-04-21_03-01-06 photo_2024-04-21_03-01-08 photo_2024-04-21_03-01-14 photo_2024-04-21_03-01-16 photo_2024-04-21_03-01-19 photo_2024-04-21_03-01-21 photo_2024-04-21_03-01-24 photo_2024-04-21_03-01-26 photo_2024-04-21_03-01-55