Example #1
0
        private void OnEnable()
        {
            // Intercept debug entries
            Application.logMessageReceivedThreaded -= ReceivedLog;
            Application.logMessageReceivedThreaded += ReceivedLog;

            // Listen for entered commands
            commandInputField.onValidateInput -= OnValidateCommand;
            commandInputField.onValidateInput += OnValidateCommand;

            if (receiveLogcatLogsInAndroid)
            {
#if !UNITY_EDITOR && UNITY_ANDROID
                if (logcatListener == null)
                {
                    logcatListener = new DebugLogLogcatListener();
                }

                logcatListener.Start(logcatArguments);
#endif
            }

            DebugLogConsole.AddCommand("save_logs", "Saves logs to a file", SaveLogsToFile);

            //Debug.LogAssertion( "assert" );
            //Debug.LogError( "error" );
            //Debug.LogException( new System.IO.EndOfStreamException() );
            //Debug.LogWarning( "warning" );
            //Debug.Log( "log" );
        }
Example #2
0
        private void OnEnable()
        {
            if (Instance != this)
            {
                return;
            }

            // Intercept debug entries
            Application.logMessageReceivedThreaded -= ReceivedLog;
            Application.logMessageReceivedThreaded += ReceivedLog;

            if (receiveLogcatLogsInAndroid)
            {
#if !UNITY_EDITOR && UNITY_ANDROID
                if (logcatListener == null)
                {
                    logcatListener = new DebugLogLogcatListener();
                }

                logcatListener.Start(logcatArguments);
#endif
            }

            DebugLogConsole.AddCommand("save_logs", "Saves logs to a file", SaveLogsToFile);
        }