UI Position Clamp – Keep RectTransform On Screen

a1creator

(0)
FREE
Publisher a1creator
File size 263.09kB
Number of files 5
Latest version 1
Latest release date 2025-04-03 09:21:11
First release date 2025-04-03 09:21:11
Supported Unity versions 2018.4.2 or higher

Ensure Your UI Stays On Screen!

This lightweight and easy-to-use extension for RectTransform ensures that your UI elements never go off-screen. With one simple method call, your UI will be positioned as expected, but if it goes outside the screen bounds, it will automatically adjust to the nearest edge.


Effortless Screen Clamping – Prevents UI elements from being positioned off-screen.
Simple API – Just call .SetPositionInsideScreen(position).
Lightweight & Efficient – Minimal overhead, perfect for any project.
Seamless Integration – Works with existing UI setups.

Ideal for tooltips, floating buttons, pop-ups, and draggable UI elements that need to stay within view!


🛠️ Quick Setup – Just import and start using it in seconds.