Skip to content

Check Rect Contains

Checks whether a Rect contains a Vector2 point.

Parameters

Parameter Description
Rect Rectangle to test.
Point Point to test against the rectangle.
True Event Sent when the point is inside the rect.
False Event Sent when the point is outside the rect.
Store Result Optional bool to store the test result.

Example

  1. Set Rect to a UI region.
  2. Set Point to mouse or touch position in the same coordinate space.
  3. Use True Event to handle "inside area" logic.