예제 #1
0
        public static void InitDebugLog(LogStringVariable _log)
        {
            if (!isErrorLogHandlerAdded)
            {
                isErrorLogHandlerAdded          = true;
                Application.logMessageReceived += ErrorLogHandler;
            }

            if (_log == null)
            {
                return;
            }

            gameLog = _log;
            hLog    = gameLog.Log;

            if (logManager == null)
            {
                logManager              = new GameObject("LogManager").AddComponent <DebugLogManager>();
                logManager.debugLog     = gameLog;
                logManager.isShownOnGui = true;
                logManager.BuildUiCanvas();
            }

            logManager.ClearLog();
        }