Hover & Drag¶
Hover¶
Add UIHandCardHover to a card prefab.
It supports:
- Vertical lift
- Additional rotation
- Scale
- Rotation straightening
- Smooth transitions
- Nested Canvas sorting
Keep Use Overlay Sorting and Create Overlay Canvas If Missing enabled for overlapping cards. This prevents pointer switching between cards when one card moves to the front.
While a card is being dragged, other cards suppress their hover effects automatically.
Drag¶
Add UIDragCard to the card. RectTransform and CanvasGroup are required automatically.
The component:
- Resolves the root Canvas
- Supports Overlay, Camera, and World Space canvases
- Moves the card to an optional drag layer
- Disables raycast blocking during drag
- Returns rejected cards to their original position
Available events:
On Drag StartedOn Drag EndedOn Drag Cancelled
Drop zones¶
Add UIDropHandler to a UI target.
Configure:
- Accepted tag
- Whether
UIDragCardis required - Whether accepted cards are destroyed
- Optional accepted-card parent
- Highlight image and color
On Card Droppedevent
Use CanAccept(GameObject) when another system needs to preview drop validity.