TextMeshPro - Text (UI) Canvas Renderer#
UI / Graphic / TextMeshPro - Text (UI) / TextMeshPro - Text (UI) Canvas Renderer
Can Read
Cannot Write
Description#
The Canvas Renderer property of the TextMeshPro - Text (UI) 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]
[Title("TextMeshPro - Text (UI) Canvas Renderer")]
[Category("UI/Graphic/TextMeshPro - Text (UI)/Canvas Renderer")]
[Description("The Canvas Renderer property of the TextMeshPro - Text (UI) component")]
[Image(typeof(IconUIText), ColorTheme.Type.Blue)]
[Keywords("UI, User, Interface, TMP, Text, Mesh, Pro")]
[Serializable]
public class GenTypeGameObject_TextMeshProUGUI_CanvasRenderer : TypeGameObject
{
[SerializeField] private GetGameObject m_TextMeshProUGUI = new GetGameObject(
new GenTypeGameObject_TextMeshProUGUI()
);
public override GameObject GetPreview(GameObject source)
{
GameObject instance = this.m_TextMeshProUGUI.GetPreview(source);
if (instance == null) return default;
TextMeshProUGUI component = instance.GetComponent<TextMeshProUGUI>();
return component != null ? component.canvasRenderer.gameObject : default;
}
public override GameObject Get(Args args)
{
TextMeshProUGUI instance = this.m_TextMeshProUGUI.Get<TextMeshProUGUI>(args);
return instance != null
? instance.canvasRenderer.gameObject
: default;
}
public override U Get<U>(Args args)
{
if (typeof(U) == typeof(TextMeshProUGUI))
{
TextMeshProUGUI instance = this.m_TextMeshProUGUI.Get<TextMeshProUGUI>(args);
return instance != null
? instance.canvasRenderer as U
: default;
}
return base.Get<U>(args);
}
public override string ToString()
{
return $"{this.m_TextMeshProUGUI} Canvas Renderer";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}