Scripting API

RectMask2D

class in UnityEngine.UI · UnityEngine.UI · inherits from UIBehaviour

14 of 16 of Unity's members
In Tassix

Clips the graphics below it to its rect (in canvas space), and culls those entirely outside. Points outside it don't hit them.

Properties 4

Rect canvasRect { get; }

Its rect (less padding) in its root canvas's space.

Vector4 padding { get; set; }
RectTransform rectTransform { get; }
Vector2Int softness { get; set; }

Methods 4

void AddClippable(IClippable clippable)
virtual bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera)
virtual void PerformClipping()

Sets each target's clip rect (the masks' intersection) and culls those outside it.

void RemoveClippable(IClippable clippable)

Not in Tassix yet 2

OnValidate UpdateClipSoftness

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.