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

TMP Text Style Sheet#

UI / Graphic / TMP Text / TMP Text Style Sheet

  • Can Read

  • Can Write

Description#

The Style Sheet property of the TMP 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;
using TMPro;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("TMP Text Style Sheet")]
    [Category("UI/Graphic/TMP Text/Style Sheet")]
    [Description("The Style Sheet property of the TMP Text component")]
    
    [Image(typeof(IconUIText), ColorTheme.Type.Blue)]
    [Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
    
    [Serializable]
    public class GenTypeScriptableObject_TMP_Text_StyleSheet : TypeScriptableObject
    {
        [SerializeField] private GetGameObject m_TMP_Text = new GetGameObject(
            new GenTypeGameObject_TMP_Text()
        );
        
        public override ScriptableObject GetPreview(GameObject source)
        {
            GameObject instance = this.m_TMP_Text.GetPreview(source);
            if (instance == null) return default;
            
            TMP_Text component = instance.GetComponent<TMP_Text>();
            return component != null ? component.styleSheet : default;
        }
        
        public override ScriptableObject Get(Args args)
        {
            TMP_Text instance = this.m_TMP_Text.Get<TMP_Text>(args);
            return instance != null
                ? instance.styleSheet
                : default;
        }
        
        public override void Set(ScriptableObject value, Args args)
        {
            TMP_Text component = this.m_TMP_Text.Get<TMP_Text>(args);
            if (component != null) component.styleSheet = (TMP_StyleSheet) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_TMP_Text} Style Sheet";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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