Dropdown Caption Image#
UI / Interaction / Dropdown / Dropdown Caption Image
Description#
Compares the Caption Image property of Dropdown component to another value
Parameters#
| Name | Description |
|---|---|
| Dropdown | |
| 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("Dropdown Caption Image")]
[Category("UI/Interaction/Dropdown/Caption Image")]
[Description("Compares the Caption Image property of Dropdown component to another value")]
[Image(typeof(IconUIDropdown), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Parameter("Dropdown")]
[Parameter("Value")]
[Serializable]
public class GenConditionGameObject_Dropdown_CheckCaptionImage : Condition
{
[SerializeField] private GetGameObject m_Dropdown = new GetGameObject(
new GenTypeGameObject_Dropdown()
);
[SerializeField] private GetGameObject m_Value = new GetGameObject();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Caption Image");
return $"{this.m_Dropdown} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
Dropdown component = this.m_Dropdown.Get<Dropdown>(args);
if (component == null) return false;
return component.captionImage == this.m_Value.Get<Image>(args);
}
}
}