Effects
Soft Mask
Mask child graphics with soft edges and nested masks
Overview
Soft Mask uses a parent Graphic to mask its descendants with soft edges.
Usage
Add Soft Mask to the Graphic that defines the masking region.
Place the graphics to be masked below it in the hierarchy.
Choose whether the mask Graphic itself remains visible.
Limitations
Up to four mask levels are supported. Custom shaders (outside of Evo UI) must support the soft-mask data; adding Soft Mask does not make an unsupported material compatible.
Public API
Use SoftMask in the Evo.UI namespace.
Call Refresh() after hierarchy changes that need immediate rediscovery.
Properties
| Name | Type | Description |
|---|---|---|
ShowMaskGraphic | bool | Shows the Graphic that defines the mask. |
InvertMask | bool | Inverts the mask coverage. |
Fields
| Name | Type | Description |
|---|---|---|
MaxMaskDepth | int | Maximum nested mask depth: 4. |
Methods
| Name | Parameters | Description |
|---|---|---|
Refresh() | None | Refreshes child bindings and mask data. |
Example
using UnityEngine;
using Evo.UI;
public class SoftMaskExample : MonoBehaviour
{
[SerializeField] private SoftMask target;
private void Start()
{
target.ShowMaskGraphic = false;
target.InvertMask = false;
target.Refresh();
}
}