Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
GUI
1/4
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.
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
2021.3.12f1
Compatible
Compatible
Compatible
Additional compatibility information

- Uses Unity's standard UI system. Not UI Toolkit. Could potentially be supported later.

Description

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.

Technical details
  • 🚀 Single Script, Zero Hassle – Just import and use!
  • 🛠 No Extra Setup Required – Works instantly with a simple method call.
  • Lightweight & Optimized – Minimal performance impact.
  • 🎯 Seamless Integration – Use .SetPositionInsideScreen(position) instead of setting transform.position directly.
  • Compatible with Any UI Layout – Works with any RectTransform in Canvas.
Created with AI

Only to help write the description

UI Position Clamp – Keep RectTransform On Screen

(not enough ratings)
FREE
940 views in the past week
License type
File size
263.1 KB
Latest version
1.0
Latest release date
Apr 3, 2025
Original Unity version
2021.3.12
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR