using UnityEngine; using TMPro; using UnityEngine.Localization; using UnityEngine.Localization.Components; /// /// Swaps a TMP_Text font based on the active locale using an Asset Table. /// Add to any GameObject with a TMP_Text that needs locale-specific fonts (e.g., CJK). /// [AddComponentMenu("Localization/Asset/Localized Font Asset")] public class LocalizedFontAsset : LocalizedAssetBehaviour { protected override void UpdateAsset(TMP_FontAsset font) { var tmp = GetComponent(); if (tmp != null) tmp.font = font; } }