Text Resize Text For Best Fit#
UI / Graphic / Text / Text Resize Text For Best Fit
Description#
Compares the Resize Text For Best Fit property of Text component to another value
Parameters#
| Name | Description |
|---|---|
| Text |
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("Text Resize Text For Best Fit")]
[Category("UI/Graphic/Text/Resize Text For Best Fit")]
[Description("Compares the Resize Text For Best Fit property of Text component to another value")]
[Image(typeof(IconUIText), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface, Label")]
[Parameter("Text")]
[Serializable]
public class GenConditionBool_Text_CheckResizeTextForBestFit : Condition
{
[SerializeField] private GetGameObject m_Text = new GetGameObject(
new GenTypeGameObject_Text()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Resize Text For Best Fit");
return $"{this.m_Text} {member}";
}
protected override bool Run(Args args)
{
Text component = this.m_Text.Get<Text>(args);
if (component == null) return false;
return component.resizeTextForBestFit;
}
}
}