Toggle Group Ensure Valid State#
UI / Interaction / Toggle Group / Toggle Group Ensure Valid State
Description#
Executes the Ensure Valid State method on the Toggle Group component
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 Ensure Valid State")]
[Category("UI/Interaction/Toggle Group/Ensure Valid State")]
[Description("Executes the Ensure Valid State method on the Toggle Group component")]
[Image(typeof(IconToggleGroup), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface, Checkbox")]
[Serializable]
public class GenInstructionToggleGroup_EnsureValidState_0 : Instruction
{
[SerializeField] private GetGameObject m_ToggleGroup = new GetGameObject(
new GenTypeGameObject_ToggleGroup()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Ensure Valid State");
return $"{this.m_ToggleGroup} {method}";
}
protected override Awaitable Run(Args args)
{
ToggleGroup component = this.m_ToggleGroup.Get<ToggleGroup>(args);
if (component == null) return Done;
component.EnsureValidState();
return Done;
}
}
}