---
tags:
    - "TMP, Text, Mesh, Pro"
---

# TMP Font Asset

[Scriptable Objects](../index.md) / [Text Mesh Pro](index.md) / **TMP Font Asset**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

A direct reference to a TMP Font Asset scriptable object instance

## Code

```cs
// <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.TextCore.LowLevel;
using UnityEngine.UI;
using TMPro;

namespace VisualScript.Runtime
{
    [Get]
    
    [Inline(nameof(m_Value), typeof(TMP_FontAsset), true)]
    
    [Title("TMP Font Asset")]
    [Category("Scriptable Objects/Text Mesh Pro/TMP Font Asset")]
    [Description("A direct reference to a TMP Font Asset scriptable object instance")]
    
    [Image(typeof(IconUIText), ColorTheme.Type.Blue)]
    [Keywords("TMP, Text, Mesh, Pro")]
    
    [Serializable]
    public class GenTypeScriptableObject_TMP_FontAsset : TypeScriptableObject
    {
        [SerializeField] private TMP_FontAsset m_Value;
        
        public override ScriptableObject GetPreview(GameObject source)
        {{
            return this.m_Value != null
                ? this.m_Value
                : null;
        }}
        
        public GenTypeScriptableObject_TMP_FontAsset()
        { }
        
        public GenTypeScriptableObject_TMP_FontAsset(TMP_FontAsset 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;
    }
}


```

