Toggle Group Set All Toggles Off#
UI / Interaction / Toggle Group / Toggle Group Set All Toggles Off
Description#
Executes the Set All Toggles Off method on the Toggle Group component
Parameters#
| Name | Description |
|---|---|
| Send Callback |
Code#
// <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 Set All Toggles Off")]
[Category("UI/Interaction/Toggle Group/Set All Toggles Off")]
[Description("Executes the Set All Toggles Off method on the Toggle Group component")]
[Image(typeof(IconToggleGroup), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface, Checkbox")]
[Parameter("Send Callback")]
[Serializable]
public class GenInstructionToggleGroup_SetAllTogglesOff_1 : Instruction
{
[SerializeField] private GetGameObject m_ToggleGroup = new GetGameObject(
new GenTypeGameObject_ToggleGroup()
);
[SerializeField] private GetBool m_SendCallback = new GetBool();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set All Toggles Off");
return $"{this.m_ToggleGroup} {method} ({this.m_SendCallback})";
}
protected override Awaitable Run(Args args)
{
ToggleGroup component = this.m_ToggleGroup.Get<ToggleGroup>(args);
if (component == null) return Done;
component.SetAllTogglesOff(
(bool) this.m_SendCallback.Get(args)
);
return Done;
}
}
}