Example #1
0
 void TryRemoveMaskMaterial()
 {
     if (_maskMaterial)
     {
         UIMaskMaterial.Remove(_material, _mask);
         _renderer.material = _material;
         _maskMaterial      = null;
     }
 }
Example #2
0
 void OnEnable()
 {
     TryRemoveMaskMaterial();
     if (_mask)
     {
         _maskMaterial      = UIMaskMaterial.Add(_material, _mask);
         _renderer.material = _maskMaterial;
     }
 }