Add debug logs about environment and fonts.
This commit is contained in:
@@ -6,6 +6,7 @@ using TMPro;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.TextCore.LowLevel;
|
using UnityEngine.TextCore.LowLevel;
|
||||||
using UnityEngine.TextCore.Text;
|
using UnityEngine.TextCore.Text;
|
||||||
|
using Logger = Cryville.Common.Logging.Logger;
|
||||||
|
|
||||||
namespace Cryville.Common.Unity.UI {
|
namespace Cryville.Common.Unity.UI {
|
||||||
[RequireComponent(typeof(TextMeshProUGUI))]
|
[RequireComponent(typeof(TextMeshProUGUI))]
|
||||||
@@ -29,12 +30,14 @@ namespace Cryville.Common.Unity.UI {
|
|||||||
else if (DefaultShader) ifont.material.shader = DefaultShader;
|
else if (DefaultShader) ifont.material.shader = DefaultShader;
|
||||||
if (_font == null) {
|
if (_font == null) {
|
||||||
_font = ifont;
|
_font = ifont;
|
||||||
|
Logger.Log("main", 1, "UI", "Using main font: {0}", typeface.FullName);
|
||||||
if (MaxFallbackCount <= 0) break;
|
if (MaxFallbackCount <= 0) break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (_font.fallbackFontAssetTable == null)
|
if (_font.fallbackFontAssetTable == null)
|
||||||
_font.fallbackFontAssetTable = new List<FontAsset>();
|
_font.fallbackFontAssetTable = new List<FontAsset>();
|
||||||
_font.fallbackFontAssetTable.Add(ifont);
|
_font.fallbackFontAssetTable.Add(ifont);
|
||||||
|
Logger.Log("main", 1, "UI", "Using fallback font #{0}: {1}", _font.fallbackFontAssetTable.Count, typeface.FullName);
|
||||||
if (_font.fallbackFontAssetTable.Count >= MaxFallbackCount) break;
|
if (_font.fallbackFontAssetTable.Count >= MaxFallbackCount) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@ using FFmpeg.AutoGen;
|
|||||||
using Ionic.Zip;
|
using Ionic.Zip;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Logger = Cryville.Common.Logging.Logger;
|
using Logger = Cryville.Common.Logging.Logger;
|
||||||
@@ -53,6 +54,12 @@ namespace Cryville.Crtr {
|
|||||||
Application.logMessageReceivedThreaded += OnLog;
|
Application.logMessageReceivedThreaded += OnLog;
|
||||||
Logger.Create("main", MainLogger);
|
Logger.Create("main", MainLogger);
|
||||||
|
|
||||||
|
Logger.Log("main", 1, "Game", "Game Version: {0}", Application.version);
|
||||||
|
Logger.Log("main", 1, "Game", "Unity Version: {0}", Application.unityVersion);
|
||||||
|
Logger.Log("main", 1, "Game", "Operating System: {0}", Environment.OSVersion);
|
||||||
|
Logger.Log("main", 1, "Game", "Platform: Build = {0}, Unity = {1}", PlatformConfig.Name, Application.platform);
|
||||||
|
Logger.Log("main", 1, "Game", "Culture: {0}, UI = {1}, System = {2}, Unity = {3}", CultureInfo.CurrentCulture, CultureInfo.CurrentUICulture, CultureInfo.InstalledUICulture, Application.systemLanguage);
|
||||||
|
|
||||||
if (_bcflag) Logger.Log("main", 2, "Game", "Reset all settings");
|
if (_bcflag) Logger.Log("main", 2, "Game", "Reset all settings");
|
||||||
|
|
||||||
GameDataPath = Settings.Default.GameDataPath;
|
GameDataPath = Settings.Default.GameDataPath;
|
||||||
|
Reference in New Issue
Block a user