using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace MartellController { /// /// 日志管理器 /// public class LogManager : MonoBehaviour { public static LogManager Instance; private static Text TextLog; // ================================================== private void Awake() { Instance = this; TextLog = GameObject.Find("Text - Log").GetComponent(); } public static void Log(string logMessage) { string logCache = $"Log >>> {logMessage}...[OK]"; TextLog.text += "\n" + logCache; Debug.Log(logCache); return; } public static void ErrorLog(string logMessage) { string logCache = $"Log >>> {logMessage}...[ER]"; TextLog.text += "\n" + logCache; Debug.Log(logCache); } } }