Toggle Group Get First Active Toggle#
UI / Interaction / Toggle Group / Toggle Group Get First Active Toggle
Description#
Compares the Get First Active Toggle method of Toggle Group component to another value
Parameters#
| Name | Description |
|---|---|
| Toggle Group | |
| Value |
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 Get First Active Toggle")]
[Category("UI/Interaction/Toggle Group/Get First Active Toggle")]
[Description("Compares the Get First Active Toggle method of Toggle Group component to another value")]
[Image(typeof(IconToggleGroup), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface, Checkbox")]
[Parameter("Toggle Group")]
[Parameter("Value")]
[Serializable]
public class GenConditionGameObject_ToggleGroup_CheckGetFirstActiveToggle_0 : Condition
{
[SerializeField] private GetGameObject m_ToggleGroup = new GetGameObject(
new GenTypeGameObject_ToggleGroup()
);
[SerializeField] private GetGameObject m_Value = new GetGameObject();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Get First Active Toggle");
string parameters = $"()";
return $"{this.m_ToggleGroup} {method} = {this.m_Value}";
}
protected override bool Run(Args args)
{
ToggleGroup component = this.m_ToggleGroup.Get<ToggleGroup>(args);
if (component == null) return false;
Toggle value = component.GetFirstActiveToggle();
return value == this.m_Value.Get<Toggle>(args);
}
}
}