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: 2025/01/15 04:35 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki