From 6d2d52c529ad380e027df624cd0ec5032930c3b4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 12 Oct 2026 04:36:52 +0200 Subject: [PATCH] EmojiFont, EmojiCheck: OTL_FeatureTag lives in UnityEngine.TextCore; kerning read from the serialized m_enableKerning Compiles (Unity 6000.3.24f1 batchmode). Fixes the previous commit, which did not. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/Editor/EmojiCheck.cs | 4 ++-- Assets/Scripts/Editor/EmojiFont.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Editor/EmojiCheck.cs b/Assets/Scripts/Editor/EmojiCheck.cs index 6ff9aa288..fb79dbd1d 100644 --- a/Assets/Scripts/Editor/EmojiCheck.cs +++ b/Assets/Scripts/Editor/EmojiCheck.cs @@ -99,7 +99,7 @@ public static class EmojiCheck var runtime = new GameObject("Runtime", typeof(RectTransform)); runtime.transform.SetParent(canvas.transform, false); runtimeLiga = runtime.AddComponent().fontFeatures - .Contains(UnityEngine.TextCore.LowLevel.OTL_FeatureTag.liga) ? 1 : 0; + .Contains(UnityEngine.TextCore.OTL_FeatureTag.liga) ? 1 : 0; if (runtimeLiga == 0) failures.Add("a TextMeshProUGUI added at runtime does not have liga: TMP Settings' features are not inherited"); // Sequences: space-separated groups, each of which must end as one visible character. @@ -155,7 +155,7 @@ public static class EmojiCheck EmojiFont.VisitSerializedTexts(component => { texts++; - if (!component.fontFeatures.Contains(UnityEngine.TextCore.LowLevel.OTL_FeatureTag.liga)) + if (!component.fontFeatures.Contains(UnityEngine.TextCore.OTL_FeatureTag.liga)) { withoutLiga++; failures.Add($"TMP text {component.name} has no liga: {GetPath(component)}"); diff --git a/Assets/Scripts/Editor/EmojiFont.cs b/Assets/Scripts/Editor/EmojiFont.cs index 27bbe0268..276a3ffbd 100644 --- a/Assets/Scripts/Editor/EmojiFont.cs +++ b/Assets/Scripts/Editor/EmojiFont.cs @@ -5,6 +5,7 @@ using TMPro; using UnityEditor; using UnityEditor.SceneManagement; using UnityEngine; +using UnityEngine.TextCore; using UnityEngine.TextCore.LowLevel; // The one writer of the emoji font asset and of TMP Settings' emoji routing. The font file is the @@ -94,7 +95,7 @@ public static class EmojiFont var (files, components) = VisitSerializedTexts(text => { var features = text.fontFeatures.ToList(); - if (!Enable(features, text.enableKerning)) return false; + if (!Enable(features, new SerializedObject(text).FindProperty("m_enableKerning").boolValue)) return false; text.fontFeatures = features; EditorUtility.SetDirty(text); return true;