Beispiel #1
1
 /// <summary>
 /// The init rth.
 /// </summary>
 /// <param name="IP">The ip.</param>
 /// <returns>The init rth.</returns>
 /// <remarks></remarks>
 //[DllImport("RthDLL.dll", CharSet = CharSet.Ansi)]
 public static debugType InitRTH(string IP)
 {
     // Try to connect
     try
     {
         InitYeloDebug(IP);
         connectedDebugType = debugType.YeloDebug;
         _IsConnected = true;
         return debugType.YeloDebug;
     }
     catch (Exception ex1)
     {
         if (IP == "<Auto>")
         {
             Globals.Global.ShowErrorMsg("Could not connect to a Yelo debug Xbox and RthDLL does not support <Auto> Mode.", ex1);
             return debugType.None;
         }
         else
         try
         {
             console = new XboxManagerClass().OpenConsole(IP);
             _debugIP = IP;
             connectedDebugType = debugType.RthDLL;
             _IsConnected = true;
             return debugType.RthDLL;
         }
         catch (Exception ex2)
         {
             Globals.Global.ShowErrorMsg("Could not connect to a debug Xbox", ex2);
             return debugType.None;
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// The init rth.
 /// </summary>
 /// <param name="IP">The ip.</param>
 /// <returns>The init rth.</returns>
 /// <remarks></remarks>
 //[DllImport("RthDLL.dll", CharSet = CharSet.Ansi)]
 public static debugType InitRTH(string IP)
 {
     // Try to connect
     try
     {
         InitYeloDebug(IP);
         connectedDebugType = debugType.YeloDebug;
         _IsConnected       = true;
         return(debugType.YeloDebug);
     }
     catch (Exception ex1)
     {
         if (IP == "<Auto>")
         {
             Globals.Global.ShowErrorMsg("Could not connect to a Yelo debug Xbox and RthDLL does not support <Auto> Mode.", ex1);
             return(debugType.None);
         }
         else
         {
             try
             {
                 console            = new XboxManagerClass().OpenConsole(IP);
                 _debugIP           = IP;
                 connectedDebugType = debugType.RthDLL;
                 _IsConnected       = true;
                 return(debugType.RthDLL);
             }
             catch (Exception ex2)
             {
                 Globals.Global.ShowErrorMsg("Could not connect to a debug Xbox", ex2);
                 return(debugType.None);
             }
         }
     }
 }
Beispiel #3
0
 public void debugError(debugType type, object message, bool sync = true)
 {
     _debug(unityDebugType.LOGERROR, type, message);
     if (sync)
     {
         syncDebug(unityDebugType.LOGERROR, message);
     }
 }
Beispiel #4
0
 public void debugWarning(debugType type, object message, bool sync = true)
 {
     _debug(unityDebugType.LOGWARNING, type, message);
     if (sync)
     {
         syncDebug(unityDebugType.LOGWARNING, message);
     }
 }
Beispiel #5
0
    public void _debug(unityDebugType unityDebugType, debugType type, object message)
    {
        if (enabledDebugTypes.Contains(type))
        {
            string debugMessage;

            switch (unityDebugType)
            {
            case unityDebugType.LOG:
                switch (type)
                {
                case debugType.BASE:
                    debugMessage = "<color=gray>[base] " + message + "</color>";
                    break;

                case debugType.EVENTS:
                    debugMessage = "<color=yellow>[events] " + message + "</color>";
                    break;

                case debugType.NETWORK:
                    debugMessage = "<color=cyan>[network] " + message + "</color>";
                    break;

                case debugType.NETWORK_WORKER:
                    debugMessage = "<color=lightblue>[network_worker] " + message + "</color>";
                    break;

                default:
                    debugMessage = message.ToString();
                    break;
                }

                Debug.Log(debugMessage);
                break;

            case unityDebugType.LOGWARNING:
                Debug.LogWarning(message);
                break;

            case unityDebugType.LOGERROR:
                Debug.LogError(message);
                break;
            }
        }
    }