---
tags:
    - "Bind"
    - "Change"
    - "Detect"
    - "Value"
---

# On Sprite Change

[Bindings](index.md) / **On Sprite Change**

## Description

Executes when the Sprite bound changes its value

## Parameters

| Name | Description |
| :--- | :---------- |
| Initial Emit | Emits the event immediately when the component is enabled or not |

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("On Sprite Change")]
    [Image(typeof(IconSprite), ColorTheme.Type.Purple, typeof(BadgeLink))]
    
    [Description("Executes when the Sprite bound changes its value")]
    [Category("Bindings/On Sprite Change")]
    
    [Keywords("Bind")]

    [Serializable]
    public class TriggerCoreBindSprite : TriggerCoreBindBase
    {
        [SerializeField] private GetSprite m_Sprite = new GetSprite();
        
        // PROPERTIES: ----------------------------------------------------------------------------

        protected override string GetTitle(GameObject source) => $"change {this.m_Sprite}";

        protected override ISubscription Subscription => this.m_Sprite;
    }
}
```

