# Sprite Mask Alpha Cutoff

[Miscellaneous](../index.md) / [Sprite Mask](index.md) / **Sprite Mask Alpha Cutoff**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Alpha Cutoff property of the Sprite Mask component

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("Sprite Mask Alpha Cutoff")]
    [Category("Miscellaneous/Sprite Mask/Alpha Cutoff")]
    [Description("The Alpha Cutoff property of the Sprite Mask component")]
    
    [Image(typeof(IconSprite), ColorTheme.Type.Purple, typeof(BadgeMinus))]
    
    [Serializable]
    public class GenTypeNumber_SpriteMask_AlphaCutoff : TypeNumber
    {
        [SerializeField] private GetGameObject m_SpriteMask = new GetGameObject(
            new GenTypeGameObject_SpriteMask()
        );
        
        public override double GetPreview(GameObject source)
        {
            GameObject instance = this.m_SpriteMask.GetPreview(source);
            if (instance == null) return default;
            
            SpriteMask component = instance.GetComponent<SpriteMask>();
            return component != null ? component.alphaCutoff : default;
        }
        
        public override double Get(Args args)
        {
            SpriteMask instance = this.m_SpriteMask.Get<SpriteMask>(args);
            return instance != null
                ? instance.alphaCutoff
                : default;
        }
        
        public override void Set(double value, Args args)
        {
            SpriteMask component = this.m_SpriteMask.Get<SpriteMask>(args);
            if (component != null) component.alphaCutoff = (float) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_SpriteMask} Alpha Cutoff";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

