Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


recttransformutility

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.txt · Last modified: 2021/06/23 20:45 by gwenpri.me