Land Explorer in HomeCamp with boot loading, journal UI, and CDN publish tooling.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -611,6 +611,12 @@ namespace AIGame.EditorTools
|
||||
{
|
||||
TextMeshProUGUI t = GetOrAdd<TextMeshProUGUI>(go);
|
||||
ApplyDefaultFont(t);
|
||||
string fontAssetPath = (string)comp["fontAsset"];
|
||||
if (!string.IsNullOrEmpty(fontAssetPath))
|
||||
{
|
||||
t.font = AssetDatabase.LoadAssetAtPath<TMP_FontAsset>(fontAssetPath);
|
||||
if (t.font == null) throw new InvalidOperationException("TMP font asset not found: " + fontAssetPath);
|
||||
}
|
||||
t.text = (string)comp["text"] ?? string.Empty;
|
||||
if (comp["fontSize"] != null) t.fontSize = (float)comp["fontSize"];
|
||||
t.fontStyle = string.Equals((string)comp["fontStyle"], "Bold", StringComparison.OrdinalIgnoreCase) ? FontStyles.Bold : FontStyles.Normal;
|
||||
|
||||
Reference in New Issue
Block a user