From 0229e944a9f77b8622ae2b34ef0fa314a8aa0fc2 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 15 五月 2026 15:32:10 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_client
---
Assets/Editor/Tool/ChangeTextAndImage.cs | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Assets/Editor/Tool/ChangeTextAndImage.cs b/Assets/Editor/Tool/ChangeTextAndImage.cs
index 6228764..a55c7c4 100644
--- a/Assets/Editor/Tool/ChangeTextAndImage.cs
+++ b/Assets/Editor/Tool/ChangeTextAndImage.cs
@@ -78,7 +78,12 @@
TextEx textEx = go.AddMissingComponent<TextEx>();
textEx.text = textContent;
- textEx.font = FontUtility.preferred;
+ var font = FontUtility.preferred;
+ if (font == null)
+ {
+ font = AssetDatabase.LoadAssetAtPath<Font>("Assets/ResourcesOut/Font/GameFont1.ttf");
+ }
+ textEx.font = font;
textEx.fontSize = textFontSize;
textEx.raycastTarget = false;
textEx.alignment = TextAnchor.MiddleCenter;
--
Gitblit v1.8.0