Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Text Align By Geometry#

UI / Graphic / Text / Text Align By Geometry

  • Can Read

  • Can Write

Description#

The Align By Geometry property of the Text component

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
{
    [Get]
    [Set]
    
    [Title("Text Align By Geometry")]
    [Category("UI/Graphic/Text/Align By Geometry")]
    [Description("The Align By Geometry property of the Text component")]
    
    [Image(typeof(IconUIText), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface, Label")]
    
    [Serializable]
    public class GenTypeBool_Text_AlignByGeometry : TypeBool
    {
        [SerializeField] private GetGameObject m_Text = new GetGameObject(
            new GenTypeGameObject_Text()
        );
        
        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_Text.GetPreview(source);
            if (instance == null) return default;
            
            Text component = instance.GetComponent<Text>();
            return component != null ? component.alignByGeometry : default;
        }
        
        public override bool Get(Args args)
        {
            Text instance = this.m_Text.Get<Text>(args);
            return instance != null
                ? instance.alignByGeometry
                : default;
        }
        
        public override void Set(bool value, Args args)
        {
            Text component = this.m_Text.Get<Text>(args);
            if (component != null) component.alignByGeometry = (bool) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_Text} Align By Geometry";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.