Hit Shapes
non-rectangular UI regions in s&box
favorite3favorites
thumb_up2upvotes
hard_drive
0 MB
folder
28 files
build
Engine v25
About This Package
Hit Shapes
Non-rectangular UI regions in s&box
Hit Shapes wraps a shape resolver in a state machine that turns whole-panel mouse events into per-slot
OnSlotEnter / OnSlotLeave / OnSlotClick callbacks.Depends only on
Vector2 and MousePanelEvent
Quick start example:
- Download the library
- Make a screen panel GameObject
- Add UI Panel --> Razor Hit Shape Demo
- Link camera to the Screen Panel
- Hit play
Built-in shapes
Radial(slots, innerRatio?, outerRatio?) - Wheel of equal wedges - 0..slots-1, clockwise from 12 o'clockRectGrid(cols, rows) - Uniform grid - row-major, top-left = 0Polygon(verts) - One polygon, unit coords - always 0 if insidePolygons(polys) - Many polygons - index of first containing polygonCustom(slotCount, nativeSize, fn) - Resolver de-scaled to a fixed pixel frame - whatever you returnCustomRaw(slotCount, fn) - Resolver receives raw engine-frame coords - whatever you returnUnion(a, b) - A's slots, then B's offset by A.SlotCount - A wins on overlapIntersect(a, b) - A's slot, only where B also resolves - A's slot countDifference(a, b) - A's slot, where B does NOT resolve - A's slot count
No usage statistics available
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
Package ID:
xaz.hit_shapes
Created:
2026-05-25 06:14 UTC
Updated:
2026-06-06 21:14 UTC
Type:
library
Public:
Yes
Version:
276866
files:
28
Size:
0.1 MB
Engine Version:
25
Asset Version ID:
276866
Version Created:
2026-06-06 21:14 UTC
Hash:
3393247542790211050
Manifest: Open manifest
Compiler:
Sandbox, SANDBOX, 1701;1702;1591;, , , , Release, Array, Array, Array, Array
Resources:
Code Package References:
276866
Jun 6, 2026
Small update
270209
May 25, 2026
fix ui
270205
May 25, 2026
added example
270198
May 25, 2026
initial commit