示例#1
0
    public static void Init()
    {
        s_LogOutPutThread.Init();

        Application.logMessageReceivedThreaded += UnityLogCallBackThread;
        Application.logMessageReceived         += UnityLogCallBack;
    }
示例#2
0
    public static void Init(bool isOpenLog = true)
    {
        Debug.logger.logEnabled = isOpenLog;

        if (isOpenLog)
        {
            s_LogOutPutThread.Init();
            Application.logMessageReceivedThreaded += UnityLogCallBackThread;
            Application.logMessageReceived         += UnityLogCallBack;
        }
    }
示例#3
0
    public static void Init(bool isOpenLog = true)
    {
#if UNITY_2017_1_OR_NEWER
        Debug.unityLogger.logEnabled = isOpenLog;
#else
        Debug.logger.logEnabled = isOpenLog;
#endif

        if (isOpenLog)
        {
            s_LogOutPutThread.Init();
            Application.logMessageReceivedThreaded += UnityLogCallBackThread;
            Application.logMessageReceived         += UnityLogCallBack;
        }
    }
示例#4
0
    public static void Init(bool isOpenLog = true)
    {
        if (Application.platform != RuntimePlatform.WindowsEditor &&
            Application.platform != RuntimePlatform.LinuxEditor)
        {
            int status = PlayerPrefs.GetInt("Log", -1);
            if (status != -1)
            {
                isOpenLog = status == 1 ? true : false;
            }
        }
        PlayerPrefs.SetInt("Log", (isOpenLog ? 1 : 0));

        if (isOpenLog)
        {
            s_LogOutPutThread.Init();
            ApplicationManager.s_OnApplicationQuit += OnApplicationQuit;
            Application.logMessageReceivedThreaded += UnityLogCallBackThread;
            Application.logMessageReceived         += UnityLogCallBack;
        }
    }