Closed BattlehubCode closed 1 year ago
https://www.youtube.com/watch?v=MKcuSs4p5xs
At the twelfth second, you'll see how to add a custom implementation to the Persistent TMP_FontAsset. Copy and paste the code below
#if !RTSL_MAINTENANCE using Battlehub.RTSL; namespace TMPro.Battlehub.SL2 { [CustomImplementation] public partial class PersistentTMP_FontAsset<TID> { public override void ReadFrom(object obj) { var uo = obj as UnityEngine.Object; if (uo != null && !m_assetDB.IsStaticResourceID(ToID(uo))) { base.ReadFrom(obj); } } public override object WriteTo(object obj) { var uo = obj as UnityEngine.Object; if (uo != null && !m_assetDB.IsStaticResourceID(ToID(uo))) { return base.WriteTo(obj); } return obj; } public override void GetDeps(GetDepsContext<TID> context) { base.GetDeps(context); } public override void GetDepsFrom(object obj, GetDepsFromContext context) { var uo = obj as UnityEngine.Object; if (uo != null && !m_assetDB.IsStaticResourceID(ToID(uo))) { base.GetDepsFrom(obj, context); } } } } #endif
https://www.youtube.com/watch?v=MKcuSs4p5xs
At the twelfth second, you'll see how to add a custom implementation to the Persistent TMP_FontAsset. Copy and paste the code below