예제 #1
0
    public void syncDebug(unityDebugType type, object message)
    {
        if (networkClient == null)
        {
            return;
        }

        WorkerDebugMessage debugMessage = new WorkerDebugMessage();

        debugMessage.message   = message.ToString();
        debugMessage.debugType = type;
        networkClient.sendMessage(debugMessage);
    }
예제 #2
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;
            }
        }
    }