Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


recttransformutility

This is an old revision of the document!


RectTransformUtility

RectangleContainsScreenPoint

When using this method on a RectTransform in a Screenspace Overlay Canvas, pass in null for the camera parameter.1)

Passing in a camera can return false-negatives. 2)

1)
This mimics the functionality of ScreenPointToWorldPointInRectangle but is unmentioned in the official docs as of 6-23-2021
2)
Tested in editor, Unity 2020.3.12f1
recttransformutility.1624481141.txt.gz · Last modified: 2025/01/15 04:35 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki