# Sprite Mask Sprite

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

## Description

Compares the Sprite property of Sprite Mask component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Sprite Mask |  |
| Value |  |

## 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
{
    [Title("Sprite Mask Sprite")]
    [Category("Miscellaneous/Sprite Mask/Sprite")]
    [Description("Compares the Sprite property of Sprite Mask component to another value")]
    
    [Image(typeof(IconSprite), ColorTheme.Type.Purple, typeof(BadgeMinus))]
    
    [Parameter("Sprite Mask")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionSprite_SpriteMask_CheckSprite : Condition
    {
        [SerializeField] private GetGameObject m_SpriteMask = new GetGameObject(
            new GenTypeGameObject_SpriteMask()
        );
        
        [SerializeField] private GetSprite m_Value = new GetSprite();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Sprite");
            return $"{this.m_SpriteMask} {member} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            SpriteMask component = this.m_SpriteMask.Get<SpriteMask>(args);
            if (component == null) return false;
            
            return component.sprite == this.m_Value.Get(args) as Sprite;
        }
    }
}


```

