---
tags:
    - "UI, User, Interface, Checkbox"
---

# Toggle Group Unregister Toggle

[UI](../../index.md) / [Interaction](../index.md) / [Toggle Group](index.md) / **Toggle Group Unregister Toggle**

## Description

Executes the Unregister Toggle method on the Toggle Group component

## Parameters

| Name | Description |
| :--- | :---------- |
| Toggle |  |

## 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;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Title("Toggle Group Unregister Toggle")]
    [Category("UI/Interaction/Toggle Group/Unregister Toggle")]
    [Description("Executes the Unregister Toggle method on the Toggle Group component")]
    
    [Image(typeof(IconToggleGroup), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface, Checkbox")]
    
    [Parameter("Toggle")]
    
    [Serializable]
    public class GenInstructionToggleGroup_UnregisterToggle_1 : Instruction
    {
        [SerializeField] private GetGameObject m_ToggleGroup = new GetGameObject(
            new GenTypeGameObject_ToggleGroup()
        );
        
        [SerializeField] private GetGameObject m_Toggle = new GetGameObject();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Unregister Toggle");
            return $"{this.m_ToggleGroup} {method} ({this.m_Toggle})";
        }
        
        protected override Awaitable Run(Args args)
        {
            ToggleGroup component = this.m_ToggleGroup.Get<ToggleGroup>(args);
            if (component == null) return Done;
            
            component.UnregisterToggle(
                (Toggle) this.m_Toggle.Get<Toggle>(args)
            );
            
            return Done;
        }
    }
}


```

