Interface IClippable
Interface for elements that can be clipped if they are under an IClipper
Namespace: UnityEngine.UI
Assembly: UnityEngine.UI.dll
Syntax
public interface IClippable
Properties
gameObject
GameObject of the IClippable object
Declaration
GameObject gameObject { get; }
Property Value
Type | Description |
---|---|
GameObject |
rectTransform
The RectTransform of the clippable.
Declaration
RectTransform rectTransform { get; }
Property Value
Type | Description |
---|---|
RectTransform |
Methods
Cull(Rect, bool)
Clip and cull the IClippable given a specific clipping rect
Declaration
void Cull(Rect clipRect, bool validRect)
Parameters
Type | Name | Description |
---|---|---|
Rect | clipRect | The Rectangle in which to clip against. |
bool | validRect | Is the Rect valid. If not then the rect has 0 size. |
RecalculateClipping()
Will be called when the state of a parent IClippable changed.
Declaration
void RecalculateClipping()
SetClipRect(Rect, bool)
Set the clip rect for the IClippable.
Declaration
void SetClipRect(Rect value, bool validRect)
Parameters
Type | Name | Description |
---|---|---|
Rect | value | The Rectangle for the clipping |
bool | validRect | Is the rect valid. |
SetClipSoftness(Vector2)
Set the clip softness for the IClippable.
The softness is a linear alpha falloff over clipSoftness pixels.
Declaration
void SetClipSoftness(Vector2 clipSoftness)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | clipSoftness | The number of pixels to apply the softness to |