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

Dropdown - TextMeshPro Caption Image#

UI / Interaction / Dropdown - TextMeshPro / Dropdown - TextMeshPro Caption Image

  • Can Read

  • Can Write

Description#

The Caption Image property of the Dropdown - TextMeshPro 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("Dropdown - TextMeshPro Caption Image")]
    [Category("UI/Interaction/Dropdown - TextMeshPro/Caption Image")]
    [Description("The Caption Image property of the Dropdown - TextMeshPro component")]
    
    [Image(typeof(IconUIDropdown), ColorTheme.Type.Blue)]
    [Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
    
    [Serializable]
    public class GenTypeGameObject_TMP_Dropdown_CaptionImage : TypeGameObject
    {
        [SerializeField] private GetGameObject m_TMP_Dropdown = new GetGameObject(
            new GenTypeGameObject_TMP_Dropdown()
        );
        
        public override GameObject GetPreview(GameObject source)
        {
            GameObject instance = this.m_TMP_Dropdown.GetPreview(source);
            if (instance == null) return default;
            
            TMP_Dropdown component = instance.GetComponent<TMP_Dropdown>();
            return component != null ? component.captionImage.gameObject : default;
        }
        
        public override GameObject Get(Args args)
        {
            TMP_Dropdown instance = this.m_TMP_Dropdown.Get<TMP_Dropdown>(args);
            return instance != null
                ? instance.captionImage.gameObject
                : default;
        }
        
        public override U Get<U>(Args args)
        {
            if (typeof(U) == typeof(TMP_Dropdown))
            {
                TMP_Dropdown instance = this.m_TMP_Dropdown.Get<TMP_Dropdown>(args);
                return instance != null
                    ? instance.captionImage as U
                    : default;
            }
            
            return base.Get<U>(args);
        }
        
        public override void Set(GameObject value, Args args)
        {
            TMP_Dropdown component = this.m_TMP_Dropdown.Get<TMP_Dropdown>(args);
            if (component != null) component.captionImage = (Image) value.Get<UnityEngine.UI.Image>();
        }
        
        public override void Set<U>(U value, Args args)
        {
            if (typeof(U) == typeof(Image))
            {
                TMP_Dropdown component = this.m_TMP_Dropdown.Get<TMP_Dropdown>(args);
                if (component != null) component.captionImage = value as Image;
            }
            
            base.Set<U>(value, args);
        }
        
        public override string ToString()
        {
            return $"{this.m_TMP_Dropdown} Caption Image";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

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