Set Text Align By Geometry#
UI / Graphic / Text / Set Text Align By Geometry
Description#
Sets the Align By Geometry property of Text component
Parameters#
| Name | Description |
|---|---|
| Text | |
| 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("Set Text Align By Geometry")]
[Category("UI/Graphic/Text/Align By Geometry")]
[Description("Sets the Align By Geometry property of Text component")]
[Image(typeof(IconUIText), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface, Label")]
[Parameter("Text")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_Text_SetAlignByGeometry : Instruction
{
[SerializeField] private GetGameObject m_Text = new GetGameObject(
new GenTypeGameObject_Text()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Align By Geometry");
return $"{this.m_Text} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
Text component = this.m_Text.Get<Text>(args);
if (component == null) return Done;
component.alignByGeometry = (bool) this.m_Value.Get(args);
return Done;
}
}
}