Skip to content

Commit

Permalink
- add Server side support.
Browse files Browse the repository at this point in the history
  • Loading branch information
chiuan committed Jul 5, 2016
1 parent 944229c commit aa10abd
Show file tree
Hide file tree
Showing 23 changed files with 54 additions and 24 deletions.
Binary file modified TTConsole.Unity/Assets/Dlls/Editor/TinyTeam.Debuger.Editor.dll
Binary file not shown.
Binary file modified TTConsole.Unity/Assets/Dlls/Editor/TinyTeam.Debuger.Editor.dll.mdb
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file modified TTConsole.Unity/Assets/Dlls/TinyTeam.Debuger.dll
Binary file not shown.
Binary file modified TTConsole.Unity/Assets/Dlls/TinyTeam.Debuger.dll.mdb
Binary file not shown.
2 changes: 1 addition & 1 deletion TTConsole.Unity/Assets/Dlls/TinyTeam.Debuger.dll.mdb.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified TTConsole.Unity/Assets/Dlls/TinyTeam.Debuger.pdb
Binary file not shown.
6 changes: 4 additions & 2 deletions TTConsole.Unity/Assets/NewBehaviourScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
TTDebuger.Log("Hello Chiuan");
TTDebuger.Log("Hello Chiuan","",new Color(1,0.3f,1));
TTDebuger.Log("socket...", "NET");
TTDebuger.Log("load xxxx.ab", "Loader");
TTDebuger.Log("success mission", "mission");

//EventTrigger tr = go.AddComponent<EventTrigger>();
//EventTrigger.Entry en = new EventTrigger.Entry();
Expand All @@ -23,7 +25,7 @@ void Start () {
//tr.delegates.Add(en);

//TTDebuger.RegisterCommand("load", LoadLevel, "");
//StartCoroutine(IEDebug());
StartCoroutine(IEDebug());

//TTDebuger.Log("hello man");
}
Expand Down
Binary file modified TTConsole.Unity/Assets/test.unity
Binary file not shown.
Binary file modified TTConsole.Unity/ProjectSettings/GraphicsSettings.asset
Binary file not shown.
Binary file modified TTConsole.Unity/ProjectSettings/ProjectSettings.asset
Binary file not shown.
2 changes: 1 addition & 1 deletion TTConsole.Unity/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 5.3.4f1
m_EditorVersion: 5.3.5f1
m_StandardAssetsVersion: 0
Binary file modified TTConsole.VS/.vs/TTConsole/v14/.suo
Binary file not shown.
Binary file modified TTConsole.VS/Build/Debug/TinyTeam.Debuger.dll
Binary file not shown.
Binary file modified TTConsole.VS/Build/Debug/TinyTeam.Debuger.pdb
Binary file not shown.
Binary file added TTConsole.VS/Build/Release/TinyTeam.Debuger.dll
Binary file not shown.
Binary file added TTConsole.VS/Build/Server/TinyTeam.Debuger.dll
Binary file not shown.
6 changes: 3 additions & 3 deletions TTConsole.VS/TTConsole.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyTeam.Debuger", "TinyTeam.Debuger\TinyTeam.Debuger.csproj", "{BAF4A347-CB17-4D56-A763-32D9F66A1FB4}"
EndProject
Expand All @@ -13,8 +13,8 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BAF4A347-CB17-4D56-A763-32D9F66A1FB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAF4A347-CB17-4D56-A763-32D9F66A1FB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAF4A347-CB17-4D56-A763-32D9F66A1FB4}.Debug|Any CPU.ActiveCfg = Server|Any CPU
{BAF4A347-CB17-4D56-A763-32D9F66A1FB4}.Debug|Any CPU.Build.0 = Server|Any CPU
{BAF4A347-CB17-4D56-A763-32D9F66A1FB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAF4A347-CB17-4D56-A763-32D9F66A1FB4}.Release|Any CPU.Build.0 = Release|Any CPU
{0CD9AD06-2985-40CA-8AAC-D4C0E96B7702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
Binary file not shown.
Binary file not shown.
60 changes: 44 additions & 16 deletions TTConsole.VS/TinyTeam.Debuger/Console/TTDebuger.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
using UnityEngine;
using System.Collections;
using System;

namespace TinyTeam.Debuger
namespace TinyTeam.Debuger
{
/// <summary>
/// Description: custom debuger,can control debug or record in memory writing in thread.
/// Author: chiuanwei
/// CreateTime: 2015-2-12
/// </summary>



using System.Collections;
using System;

#if UNITY_ENGINE
using UnityEngine;
#endif

public class TTDebuger
{
static public bool EnableLog = true;
Expand All @@ -23,27 +26,40 @@ static public void Log(object message, string customType)
{
if (EnableLog)
{
#if UNITY_ENGINE
Console.Log(message,customType);
#else
System.Console.WriteLine("Log>" + customType + " : " + message);
#endif
}
}

static public void Log(object message, string customType,Color col)
{
if (EnableLog)
{
Console.Log(message, customType, col);
}
}
#if UNITY_ENGINE
// Dont use Color..

//static public void Log(object message, string customType,Color col)
//{
// if (EnableLog)
// {
// Console.Log(message, customType, col);
// }
//}
#endif

static public void LogError(object message)
{
LogError(message, null);
}

static public void LogError(object message, string customType)
{
if (EnableLog)
{
Console.LogError(message, customType);
#if UNITY_ENGINE
Console.LogError(message, customType);
#else
System.Console.WriteLine("LogError>" + customType + " : " + message);
#endif
}
}
static public void LogWarning(object message)
Expand All @@ -54,20 +70,32 @@ static public void LogWarning(object message, string customType)
{
if (EnableLog)
{
#if UNITY_ENGINE
Console.LogWarning(message, customType);
#else
System.Console.WriteLine("LogWarning>" + customType + " : " + message);
#endif
}
}

public static void RegisterCommand(string commandString, Func<string[],object> commandCallback, string CMD_Discribes)
{
if(EnableLog)
if (EnableLog)
{
#if UNITY_ENGINE
Console.RegisterCommand(commandString, commandCallback, CMD_Discribes);
#endif
}
}

public static void UnRegisterCommand(string commandString)
{
if(EnableLog)
if (EnableLog)
{
#if UNITY_ENGINE
Console.UnRegisterCommand(commandString);
#endif
}
}

}
Expand Down
Binary file modified TTConsole.VS/TinyTeam.Debuger/TinyTeam.Debuger.csproj
Binary file not shown.

0 comments on commit aa10abd

Please sign in to comment.