Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Sprite Mask Alpha Cutoff#

Miscellaneous / Sprite Mask / Sprite Mask Alpha Cutoff

  • Can Read

  • Can Write

Description#

The Alpha Cutoff property of the Sprite Mask component

Code#

// <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;
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.