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

# On Bool Change

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

## Description

Executes when the Bool 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 Bool Change")]
    [Image(typeof(IconToggleOn), ColorTheme.Type.Red, typeof(BadgeLink))]
    
    [Description("Executes when the Bool bound changes its value")]
    [Category("Bindings/On Bool Change")]

    [Serializable]
    public class TriggerCoreBindBool : TriggerCoreBindBase
    {
        [SerializeField] private GetBool m_Bool = new GetBool();
        
        // PROPERTIES: ----------------------------------------------------------------------------

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

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

