Dropdown - TextMeshPro Placeholder#
UI / Interaction / Dropdown - TextMeshPro / Dropdown - TextMeshPro Placeholder
Description#
Compares the Placeholder property of Dropdown - TextMeshPro component to another value
Parameters#
| Name | Description |
|---|---|
| TMP 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;
using TMPro;
namespace VisualScript.Runtime
{
[Title("Dropdown - TextMeshPro Placeholder")]
[Category("UI/Interaction/Dropdown - TextMeshPro/Placeholder")]
[Description("Compares the Placeholder property of Dropdown - TextMeshPro component to another value")]
[Image(typeof(IconUIDropdown), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Parameter("TMP Dropdown")]
[Parameter("Value")]
[Serializable]
public class GenConditionGameObject_TMP_Dropdown_CheckPlaceholder : Condition
{
[SerializeField] private GetGameObject m_TMP_Dropdown = new GetGameObject(
new GenTypeGameObject_TMP_Dropdown()
);
[SerializeField] private GetGameObject m_Value = new GetGameObject();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Placeholder");
return $"{this.m_TMP_Dropdown} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
TMP_Dropdown component = this.m_TMP_Dropdown.Get<TMP_Dropdown>(args);
if (component == null) return false;
return component.placeholder == this.m_Value.Get<Graphic>(args);
}
}
}