TMP Sprite Asset#
Scriptable Objects / Text Mesh Pro / TMP Sprite Asset
Can Read
Cannot Write
Description#
A direct reference to a TMP Sprite Asset scriptable object instance
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]
[Inline(nameof(m_Value), typeof(TMP_SpriteAsset), true)]
[Title("TMP Sprite Asset")]
[Category("Scriptable Objects/Text Mesh Pro/TMP Sprite Asset")]
[Description("A direct reference to a TMP Sprite Asset scriptable object instance")]
[Image(typeof(IconSprite), ColorTheme.Type.Blue)]
[Keywords("TMP, Text, Mesh, Pro")]
[Serializable]
public class GenTypeScriptableObject_TMP_SpriteAsset : TypeScriptableObject
{
[SerializeField] private TMP_SpriteAsset m_Value;
public override ScriptableObject GetPreview(GameObject source)
{{
return this.m_Value != null
? this.m_Value
: null;
}}
public GenTypeScriptableObject_TMP_SpriteAsset()
{ }
public GenTypeScriptableObject_TMP_SpriteAsset(TMP_SpriteAsset instance)
{
this.m_Value = instance;
}
public override ScriptableObject Get(Args args)
{
return this.m_Value != null
? this.m_Value
: null;
}
public override string ToString()
{
return TextUtils.Name(this.m_Value);
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnEditorChange;
}
}