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

# Toggle Rebuild

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

## Description

Executes the Rebuild method on the Toggle component

## Parameters

| Name | Description |
| :--- | :---------- |
| Executing |  |

## 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 Rebuild")]
    [Category("UI/Interaction/Toggle/Rebuild")]
    [Description("Executes the Rebuild method on the Toggle component")]
    
    [Image(typeof(IconToggleOn), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface, Checkbox")]
    
    [Parameter("Executing")]
    
    [Serializable]
    public class GenInstructionToggle_Rebuild_1 : Instruction
    {
        [SerializeField] private GetGameObject m_Toggle = new GetGameObject(
            new GenTypeGameObject_Toggle()
        );
        
        [SerializeField] private CanvasUpdate m_Executing = default;
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Rebuild");
            return $"{this.m_Toggle} {method} ({this.m_Executing})";
        }
        
        protected override Awaitable Run(Args args)
        {
            Toggle component = this.m_Toggle.Get<Toggle>(args);
            if (component == null) return Done;
            
            component.Rebuild(
                this.m_Executing
            );
            
            return Done;
        }
    }
}


```

