【C#Log】C#层log打印走log等级控制

dev_chengFeng
gaoxin 2021-07-09 11:56:53 +08:00
parent 5e1897515b
commit 9b48609229
30 changed files with 134 additions and 135 deletions

View File

@ -287,7 +287,7 @@ public class App : UnitySingleton<App>
/// <param name="hasFocus"></param> /// <param name="hasFocus"></param>
void OnApplicationFocus(bool hasFocus) void OnApplicationFocus(bool hasFocus)
{ {
Debug.Log("App.cs OnApplicationFocus"); XDebug.Log.l("App.cs OnApplicationFocus");
Util.CallMethod("Game", "OnApplicationFocus", hasFocus); Util.CallMethod("Game", "OnApplicationFocus", hasFocus);
} }
@ -297,7 +297,7 @@ public class App : UnitySingleton<App>
/// <param name="pauseStatus"></param> /// <param name="pauseStatus"></param>
void OnApplicationPause(bool pauseStatus) void OnApplicationPause(bool pauseStatus)
{ {
Debug.Log("App.cs OnApplicationPause"); XDebug.Log.l("App.cs OnApplicationPause");
Util.CallMethod("Game", "OnApplicationPause", pauseStatus); Util.CallMethod("Game", "OnApplicationPause", pauseStatus);
} }
@ -306,7 +306,7 @@ public class App : UnitySingleton<App>
/// </summary> /// </summary>
void OnApplicationQuit() void OnApplicationQuit()
{ {
Debug.Log("App.cs OnApplicationQuit"); XDebug.Log.l("App.cs OnApplicationQuit");
Util.CallMethod("Game", "OnApplicationQuit"); Util.CallMethod("Game", "OnApplicationQuit");
} }

View File

@ -33,7 +33,7 @@ namespace GameLogic
{ {
appId = VersionManager.Instance.GetVersionInfo("buglyId"); appId = VersionManager.Instance.GetVersionInfo("buglyId");
} }
Debug.Log("Bugly Init: " + appId); XDebug.Log.l("Bugly Init: " + appId);
BuglyAgent.InitWithAppId(appId); BuglyAgent.InitWithAppId(appId);
BuglyAgent.EnableExceptionHandler(); BuglyAgent.EnableExceptionHandler();
} }

View File

@ -40,7 +40,7 @@ public class CompressManager : UnitySingleton<CompressManager>
FileInfo f = new FileInfo(sourcePath); FileInfo f = new FileInfo(sourcePath);
if ((f.Length / 1024) >= compressSize) if ((f.Length / 1024) >= compressSize)
{ {
Debug.Log("开始压缩,图片原始大小为:" + f.Length / 1000 + "Kb"); XDebug.Log.l("开始压缩,图片原始大小为:" + f.Length / 1000 + "Kb");
} }
int qualityI = 50; int qualityI = 50;
@ -56,16 +56,16 @@ public class CompressManager : UnitySingleton<CompressManager>
{ {
Texture2D t2d = www.texture; Texture2D t2d = www.texture;
byte[] b = t2d.EncodeToJPG(qualityI); byte[] b = t2d.EncodeToJPG(qualityI);
Debug.Log("图原始读取的字节数 " + (b.Length / 1000).ToString()); XDebug.Log.l("图原始读取的字节数 " + (b.Length / 1000).ToString());
while ((b.Length / 1024) >= compressSize && qualityI>0) while ((b.Length / 1024) >= compressSize && qualityI>0)
{ {
qualityI -= 5; qualityI -= 5;
b = t2d.EncodeToJPG(qualityI); b = t2d.EncodeToJPG(qualityI);
Debug.Log("当前大小:" + b.Length / 1000); XDebug.Log.l("当前大小:" + b.Length / 1000);
} }
Debug.Log("压缩成功,当前大小:" + b.Length / 1000); XDebug.Log.l("压缩成功,当前大小:" + b.Length / 1000);
File.WriteAllBytes(outPath, b); File.WriteAllBytes(outPath, b);
if (action != null) if (action != null)

View File

@ -131,12 +131,12 @@ namespace GameLogic
else else
{ {
string url = AppConst.FilePathEx + configStreamFilePath; string url = AppConst.FilePathEx + configStreamFilePath;
Debug.Log("[ConfigLoader Start ]@" + url); XDebug.Log.l("[ConfigLoader Start ]@" + url);
WWW _www = new WWW(url); WWW _www = new WWW(url);
yield return _www; yield return _www;
if (string.IsNullOrEmpty(_www.error)) if (string.IsNullOrEmpty(_www.error))
{ {
Debug.Log("[ConfigLoader OK ]=" + _www.text); XDebug.Log.l("[ConfigLoader OK ]=" + _www.text);
NetInfo = new MConfig(_www.text); NetInfo = new MConfig(_www.text);
} }
else else

View File

@ -88,7 +88,7 @@ namespace GameLogic
public SocketClient AddSocket(string ipAddress, int port) public SocketClient AddSocket(string ipAddress, int port)
{ {
Debug.Log("SocketClient AddSocket"); XDebug.Log.l("SocketClient AddSocket");
SocketClient socket = new SocketClient(ipAddress, port); SocketClient socket = new SocketClient(ipAddress, port);
socket.netMgr = this; socket.netMgr = this;
socketList.Add(socket); socketList.Add(socket);
@ -205,7 +205,7 @@ namespace GameLogic
duration += Time.deltaTime; duration += Time.deltaTime;
if(duration>=AppConst.HttpTimeout) if(duration>=AppConst.HttpTimeout)
{ {
Debug.Log(url + " HttpPostError: HttpTimeout:"+ AppConst.HttpTimeout+" "+ data); XDebug.Log.l(url + " HttpPostError: HttpTimeout:"+ AppConst.HttpTimeout+" "+ data);
if (errorAction != null) if (errorAction != null)
errorAction(); errorAction();
@ -221,7 +221,7 @@ namespace GameLogic
Debug.LogWarning(url+" Result: " + result); Debug.LogWarning(url+" Result: " + result);
if (postData.error != null) if (postData.error != null)
{ {
Debug.Log("HttpPostError: " + postData.error); XDebug.Log.l("HttpPostError: " + postData.error);
if (errorAction != null) if (errorAction != null)
errorAction(); errorAction();

View File

@ -105,9 +105,9 @@ public class RoleRenderManager : UnitySingleton<RoleRenderManager>
} }
for(int i = 0; i < 6; i++) for(int i = 0; i < 6; i++)
{ {
Debug.Log("加载材质:"); XDebug.Log.l("加载材质:");
Material m = App.ResMgr.LoadAsset("R" + i) as Material; Material m = App.ResMgr.LoadAsset("R" + i) as Material;
Debug.Log("目标材质:" + m.name); XDebug.Log.l("目标材质:" + m.name);
TargetMaterial[i] = m; TargetMaterial[i] = m;
} }
} }

View File

@ -40,32 +40,32 @@ namespace GameLogic {
// string joinSuccessMessage = string.Format("joinChannel callback uid: {0}, channel: {1}, version: {2}", uid, channelName, RtcEngineForGaming.GetSdkVersion()); // string joinSuccessMessage = string.Format("joinChannel callback uid: {0}, channel: {1}, version: {2}", uid, channelName, RtcEngineForGaming.GetSdkVersion());
// selfID = uid; // selfID = uid;
// //Debug.LogWarning("~~~~~~~~~~~~~~~~~~~~~~~~~~~~Self ID: " + uid); // //Debug.LogWarning("~~~~~~~~~~~~~~~~~~~~~~~~~~~~Self ID: " + uid);
// Debug.Log(joinSuccessMessage); // XDebug.Log.l(joinSuccessMessage);
//}; //};
//mRtcEngine.OnLeaveChannel += (RtcStats stats) => //mRtcEngine.OnLeaveChannel += (RtcStats stats) =>
//{ //{
// string leaveChannelMessage = string.Format("onLeaveChannel callback duration {0}, tx: {1}, rx: {2}, tx kbps: {3}, rx kbps: {4}", stats.duration, stats.txBytes, stats.rxBytes, stats.txKBitRate, stats.rxKBitRate); // string leaveChannelMessage = string.Format("onLeaveChannel callback duration {0}, tx: {1}, rx: {2}, tx kbps: {3}, rx kbps: {4}", stats.duration, stats.txBytes, stats.rxBytes, stats.txKBitRate, stats.rxKBitRate);
// Debug.Log(leaveChannelMessage); // XDebug.Log.l(leaveChannelMessage);
//}; //};
//mRtcEngine.OnUserJoined += (uint uid, int elapsed) => //mRtcEngine.OnUserJoined += (uint uid, int elapsed) =>
//{ //{
// string userJoinedMessage = string.Format("onUserJoined callback uid {0} {1}", uid, elapsed); // string userJoinedMessage = string.Format("onUserJoined callback uid {0} {1}", uid, elapsed);
// Debug.Log(userJoinedMessage); // XDebug.Log.l(userJoinedMessage);
//}; //};
//mRtcEngine.OnUserOffline += (uint uid, USER_OFFLINE_REASON reason) => //mRtcEngine.OnUserOffline += (uint uid, USER_OFFLINE_REASON reason) =>
//{ //{
// string userOfflineMessage = string.Format("onUserOffline callback uid {0} {1}", uid, reason); // string userOfflineMessage = string.Format("onUserOffline callback uid {0} {1}", uid, reason);
// Debug.Log(userOfflineMessage); // XDebug.Log.l(userOfflineMessage);
//}; //};
//mRtcEngine.OnVolumeIndication += (AudioVolumeInfo[] speakers, int speakerNumber, int totalVolume) => //mRtcEngine.OnVolumeIndication += (AudioVolumeInfo[] speakers, int speakerNumber, int totalVolume) =>
//{ //{
// //if (speakerNumber == 0 || speakers == null) // //if (speakerNumber == 0 || speakers == null)
// //{ // //{
// // //Debug.Log(string.Format("onVolumeIndication only local {0}", totalVolume)); // // //XDebug.Log.l(string.Format("onVolumeIndication only local {0}", totalVolume));
// //} // //}
// for (int idx = 0; idx < speakerNumber; idx++) // for (int idx = 0; idx < speakerNumber; idx++)
@ -82,7 +82,7 @@ namespace GameLogic {
//mRtcEngine.OnUserMuted += (uint uid, bool muted) => //mRtcEngine.OnUserMuted += (uint uid, bool muted) =>
//{ //{
// // string userMutedMessage = string.Format("onUserMuted callback uid {0} {1}", uid, muted); // // string userMutedMessage = string.Format("onUserMuted callback uid {0} {1}", uid, muted);
// //Debug.Log(userMutedMessage); // //XDebug.Log.l(userMutedMessage);
// uint id = uid; // uint id = uid;
// if (id == 0) id = selfID; // if (id == 0) id = selfID;
@ -93,51 +93,51 @@ namespace GameLogic {
//{ //{
// string description = RtcEngineForGaming.GetErrorDescription(warn); // string description = RtcEngineForGaming.GetErrorDescription(warn);
// string warningMessage = string.Format("onWarning callback {0} {1} {2}", warn, msg, description); // string warningMessage = string.Format("onWarning callback {0} {1} {2}", warn, msg, description);
// Debug.Log(warningMessage); // XDebug.Log.l(warningMessage);
//}; //};
//mRtcEngine.OnError += (int error, string msg) => //mRtcEngine.OnError += (int error, string msg) =>
//{ //{
// string description = RtcEngineForGaming.GetErrorDescription(error); // string description = RtcEngineForGaming.GetErrorDescription(error);
// string errorMessage = string.Format("onError callback {0} {1} {2}", error, msg, description); // string errorMessage = string.Format("onError callback {0} {1} {2}", error, msg, description);
// Debug.Log(errorMessage); // XDebug.Log.l(errorMessage);
//}; //};
//mRtcEngine.OnRtcStats += (RtcStats stats) => //mRtcEngine.OnRtcStats += (RtcStats stats) =>
//{ //{
// string rtcStatsMessage = string.Format("onRtcStats callback duration {0}, tx: {1}, rx: {2}, tx kbps: {3}, rx kbps: {4}, tx(a) kbps: {5}, rx(a) kbps: {6} users {7}", // string rtcStatsMessage = string.Format("onRtcStats callback duration {0}, tx: {1}, rx: {2}, tx kbps: {3}, rx kbps: {4}, tx(a) kbps: {5}, rx(a) kbps: {6} users {7}",
// stats.duration, stats.txBytes, stats.rxBytes, stats.txKBitRate, stats.rxKBitRate, stats.txAudioKBitRate, stats.rxAudioKBitRate, stats.users); // stats.duration, stats.txBytes, stats.rxBytes, stats.txKBitRate, stats.rxKBitRate, stats.txAudioKBitRate, stats.rxAudioKBitRate, stats.users);
// Debug.Log(rtcStatsMessage); // XDebug.Log.l(rtcStatsMessage);
// int lengthOfMixingFile = mRtcEngine.GetAudioMixingDuration(); // int lengthOfMixingFile = mRtcEngine.GetAudioMixingDuration();
// int currentTs = mRtcEngine.GetAudioMixingCurrentPosition(); // int currentTs = mRtcEngine.GetAudioMixingCurrentPosition();
// string mixingMessage = string.Format("Mixing File Meta {0}, {1}", lengthOfMixingFile, currentTs); // string mixingMessage = string.Format("Mixing File Meta {0}, {1}", lengthOfMixingFile, currentTs);
// Debug.Log(mixingMessage); // XDebug.Log.l(mixingMessage);
//}; //};
//mRtcEngine.OnAudioRouteChanged += (AUDIO_ROUTE route) => //mRtcEngine.OnAudioRouteChanged += (AUDIO_ROUTE route) =>
//{ //{
// string routeMessage = string.Format("onAudioRouteChanged {0}", route); // string routeMessage = string.Format("onAudioRouteChanged {0}", route);
// Debug.Log(routeMessage); // XDebug.Log.l(routeMessage);
//}; //};
//mRtcEngine.OnRequestChannelKey += () => //mRtcEngine.OnRequestChannelKey += () =>
//{ //{
// string requestKeyMessage = string.Format("OnRequestChannelKey"); // string requestKeyMessage = string.Format("OnRequestChannelKey");
// Debug.Log(requestKeyMessage); // XDebug.Log.l(requestKeyMessage);
//}; //};
//mRtcEngine.OnConnectionInterrupted += () => //mRtcEngine.OnConnectionInterrupted += () =>
//{ //{
// string interruptedMessage = string.Format("OnConnectionInterrupted"); // string interruptedMessage = string.Format("OnConnectionInterrupted");
// Debug.Log(interruptedMessage); // XDebug.Log.l(interruptedMessage);
//}; //};
//mRtcEngine.OnConnectionLost += () => //mRtcEngine.OnConnectionLost += () =>
//{ //{
// string lostMessage = string.Format("OnConnectionLost"); // string lostMessage = string.Format("OnConnectionLost");
// Debug.Log(lostMessage); // XDebug.Log.l(lostMessage);
//}; //};
//mRtcEngine.SetLogFilter(LOG_FILTER.INFO); //mRtcEngine.SetLogFilter(LOG_FILTER.INFO);
@ -185,7 +185,7 @@ namespace GameLogic {
// yield return new WaitForEndOfFrame(); // yield return new WaitForEndOfFrame();
// if (mRtcEngine == null) yield break; // if (mRtcEngine == null) yield break;
// Debug.Log(string.Format("tap joinChannel with channel name {0}", channelName)); // XDebug.Log.l(string.Format("tap joinChannel with channel name {0}", channelName));
// if (string.IsNullOrEmpty(channelName)) // if (string.IsNullOrEmpty(channelName))
// { // {
// yield break; // yield break;

View File

@ -23,7 +23,7 @@ namespace GameLogic
private Dictionary<string, object> stringToDic(string s) private Dictionary<string, object> stringToDic(string s)
{ {
Debug.Log("stringToDic***************" + s); XDebug.Log.l("stringToDic***************" + s);
Dictionary<string, object> d = new Dictionary<string, object>(); Dictionary<string, object> d = new Dictionary<string, object>();
if (s == "") return d; if (s == "") return d;
string[] kvs = s.Split('|'); string[] kvs = s.Split('|');
@ -100,7 +100,7 @@ namespace GameLogic
foreach (string id in data.Keys) foreach (string id in data.Keys)
{ {
object value = data[id]; object value = data[id];
Debug.Log("value:" + value.ToString()); XDebug.Log.l("value:" + value.ToString());
} }
ThinkingAnalyticsAPI.SetSuperProperties(data); ThinkingAnalyticsAPI.SetSuperProperties(data);
} }
@ -114,8 +114,8 @@ namespace GameLogic
public void Track(string trackEvent, string trackData) public void Track(string trackEvent, string trackData)
{ {
Debug.Log("事件名称:" + trackEvent); XDebug.Log.l("事件名称:" + trackEvent);
Debug.Log("事件数据:" + trackData); XDebug.Log.l("事件数据:" + trackData);
Dictionary<string, object> data = stringToDic(trackData); Dictionary<string, object> data = stringToDic(trackData);
ThinkingAnalyticsAPI.Track(trackEvent, data); ThinkingAnalyticsAPI.Track(trackEvent, data);
} }
@ -127,8 +127,8 @@ namespace GameLogic
} }
// Debug.Log("TA.TAExample - current disctinct ID is: " + ThinkingAnalyticsAPI.GetDistinctId()); // XDebug.Log.l("TA.TAExample - current disctinct ID is: " + ThinkingAnalyticsAPI.GetDistinctId());
// Debug.Log("TA.TAExample - the device ID is: " + ThinkingAnalyticsAPI.GetDeviceId()); // XDebug.Log.l("TA.TAExample - the device ID is: " + ThinkingAnalyticsAPI.GetDeviceId());
// // 设置动态公共属性,传 this 是因为 this 实现了 IDynamicSuperProperties // // 设置动态公共属性,传 this 是因为 this 实现了 IDynamicSuperProperties
// ThinkingAnalyticsAPI.SetDynamicSuperProperties(this); // ThinkingAnalyticsAPI.SetDynamicSuperProperties(this);

View File

@ -111,7 +111,7 @@ public class SocketClient
public SocketClient(string ipAddress, int port) public SocketClient(string ipAddress, int port)
{ {
//Debug.Log("****Socket*********************创建一个Socket ---" + ipAddress); //XDebug.Log.l("****Socket*********************创建一个Socket ---" + ipAddress);
IpAddress = ipAddress; IpAddress = ipAddress;
Port = port; Port = port;
_memStream = new MemoryStream(); _memStream = new MemoryStream();
@ -134,7 +134,7 @@ public class SocketClient
/// </summary> /// </summary>
public void Connect() public void Connect()
{ {
//Debug.Log("****Socket*********************Connect ---" + IpAddress); //XDebug.Log.l("****Socket*********************Connect ---" + IpAddress);
Close(); Close();
try try
{ {
@ -155,7 +155,7 @@ public class SocketClient
public void OnConnectFail() public void OnConnectFail()
{ {
//Debug.Log("****Socket*********************OnConnectFail ---" + IpAddress); //XDebug.Log.l("****Socket*********************OnConnectFail ---" + IpAddress);
AddStateInfo(NetworkStateType.ConnectFail, null); AddStateInfo(NetworkStateType.ConnectFail, null);
} }
@ -164,7 +164,7 @@ public class SocketClient
/// </summary> /// </summary>
void OnConnect(IAsyncResult asr) void OnConnect(IAsyncResult asr)
{ {
//Debug.Log("****Socket*********************OnConnect ---" + IpAddress); //XDebug.Log.l("****Socket*********************OnConnect ---" + IpAddress);
//outStream = client.GetStream(); //outStream = client.GetStream();
//client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null); //client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
//AddStateInfo(NetworkStateType.Connected, null); //AddStateInfo(NetworkStateType.Connected, null);
@ -174,7 +174,7 @@ public class SocketClient
//检测是否成功的建立了链接。.. //检测是否成功的建立了链接。..
if (client == null || !client.Connected) if (client == null || !client.Connected)
{ {
Debug.Log("****Socket*********************OnConnect FAILED ---" + IpAddress); XDebug.Log.l("****Socket*********************OnConnect FAILED ---" + IpAddress);
return; return;
} }
try try
@ -186,11 +186,11 @@ public class SocketClient
outStream = client.GetStream(); outStream = client.GetStream();
client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null); client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
AddStateInfo(NetworkStateType.Connected, null); AddStateInfo(NetworkStateType.Connected, null);
Debug.Log("****Socket*********************OnConnect SUCCESS ---" + IpAddress); XDebug.Log.l("****Socket*********************OnConnect SUCCESS ---" + IpAddress);
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Log("****Socket*********************OnConnect FAILED ---" + e.Message); XDebug.Log.l("****Socket*********************OnConnect FAILED ---" + e.Message);
} }
} }
@ -226,7 +226,7 @@ public class SocketClient
} }
else else
{ {
Debug.Log("client.connected----->>false"); XDebug.Log.l("client.connected----->>false");
} }
} }
} }
@ -249,7 +249,7 @@ public class SocketClient
return; return;
//int ilen = client.GetStream().EndRead(asr); //int ilen = client.GetStream().EndRead(asr);
// Debug.Log("[SocketClient] From Socket: EndRead.Len:" + ilen); // XDebug.Log.l("[SocketClient] From Socket: EndRead.Len:" + ilen);
lock (client.GetStream()) lock (client.GetStream())
@ -264,7 +264,7 @@ public class SocketClient
AddStateInfo(NetworkStateType.Disconnect, "bytesRead < 1"); AddStateInfo(NetworkStateType.Disconnect, "bytesRead < 1");
return; return;
} }
//Debug.Log("[SocketClient] NowClient:@" + ++_NNN+" _:"+bytesRead + ":" + client.Client.Handle); //XDebug.Log.l("[SocketClient] NowClient:@" + ++_NNN+" _:"+bytesRead + ":" + client.Client.Handle);
OnReceive(byteBuffer, bytesRead); //分析数据包内容,抛给逻辑层 OnReceive(byteBuffer, bytesRead); //分析数据包内容,抛给逻辑层
lock (client.GetStream()) lock (client.GetStream())
@ -274,7 +274,7 @@ public class SocketClient
client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null); client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
} }
//Debug.Log("SocketClient.OnRead " + byteBuffer.ToString()); //XDebug.Log.l("SocketClient.OnRead " + byteBuffer.ToString());
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -335,7 +335,7 @@ public class SocketClient
void OnReceive(byte[] bytes, int length) void OnReceive(byte[] bytes, int length)
{ {
//Debug.Log("****Socket*********************OnReceive ---" + IpAddress); //XDebug.Log.l("****Socket*********************OnReceive ---" + IpAddress);
try try
{ {
var stream = CurMemoryStream; var stream = CurMemoryStream;
@ -403,7 +403,7 @@ public class SocketClient
buffer.ReadIntToByte(); buffer.ReadIntToByte();
//协议号 //协议号
int msgid = buffer.ReadIntToByte(); int msgid = buffer.ReadIntToByte();
//Debug.Log("[SocketClient:OnReceivedMessage]msgid:" + msgid); //XDebug.Log.l("[SocketClient:OnReceivedMessage]msgid:" + msgid);
//收到心跳包 //收到心跳包
if (msgid == 1001) if (msgid == 1001)
{ {
@ -426,7 +426,7 @@ public class SocketClient
private void Ygqmgx_indicationErrorAction(ByteBuffer buffer) private void Ygqmgx_indicationErrorAction(ByteBuffer buffer)
{ {
//Debug.Log("****Socket*********************indicationErrorAction ---" + IpAddress); //XDebug.Log.l("****Socket*********************indicationErrorAction ---" + IpAddress);
Util.CallMethod("SocketManager", "ReceiveErrorInfo", this, buffer); Util.CallMethod("SocketManager", "ReceiveErrorInfo", this, buffer);
} }
@ -444,11 +444,11 @@ public class SocketClient
try try
{ {
client.Client.Disconnect(false); client.Client.Disconnect(false);
//Debug.Log("****Socket*********************Disconnect() ---" + client.Client.Handle+ "@"+ client.Client.LocalEndPoint.ToString()); //XDebug.Log.l("****Socket*********************Disconnect() ---" + client.Client.Handle+ "@"+ client.Client.LocalEndPoint.ToString());
} }
catch { } catch { }
Debug.Log("****Socket*********************Close ---" + client.Client.Handle); XDebug.Log.l("****Socket*********************Close ---" + client.Client.Handle);
try try
{ {
client.Close(); client.Close();
@ -549,7 +549,7 @@ public class SocketClient
if (testConnect) if (testConnect)
{ {
UnityEngine.Debug.Log("~~~~~~~~~~~~~测试掉线~~~~~~~~~~~~~~~"); XDebug.Log.l("~~~~~~~~~~~~~测试掉线~~~~~~~~~~~~~~~");
} }
if (m_isConnecting && !testConnect) if (m_isConnecting && !testConnect)
@ -566,7 +566,7 @@ public class SocketClient
//FHF Debug time preform //FHF Debug time preform
// stw.Stop(); // stw.Stop();
// if(_CCC>0) // if(_CCC>0)
// UnityEngine.Debug.Log("NET EVENT HANDLE: " + _CCC.ToString()+"@"+(stw.ElapsedTicks).ToString()); // UnityEngine.XDebug.Log.l("NET EVENT HANDLE: " + _CCC.ToString()+"@"+(stw.ElapsedTicks).ToString());
} }
void DispatchMessage(NetMsg _event) void DispatchMessage(NetMsg _event)
@ -637,7 +637,7 @@ public class SocketClient
public void Disconnect(string _err) public void Disconnect(string _err)
{ {
Error = _err; Error = _err;
Debug.Log("****Socket*********************Disconnect [" + Error + "] ---" + IpAddress); XDebug.Log.l("****Socket*********************Disconnect [" + Error + "] ---" + IpAddress);
Close(); Close();
Util.CallMethod("SocketManager", "OnDisconnect", this, _err); Util.CallMethod("SocketManager", "OnDisconnect", this, _err);
} }
@ -646,7 +646,7 @@ public class SocketClient
IEnumerator CheckConnect_Co() IEnumerator CheckConnect_Co()
{ {
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
Debug.LogWarning("Start Connecting IP: " + IpAddress + " Port: " + Port); XDebug.Log.warning("Start Connecting IP: " + IpAddress + " Port: " + Port);
Connect(); Connect();
m_isConnecting = true; m_isConnecting = true;
yield return new WaitForSeconds(AppConst.ConnectTimeout); yield return new WaitForSeconds(AppConst.ConnectTimeout);
@ -663,7 +663,7 @@ public class SocketClient
/// </summary> /// </summary>
public void TryConnect() public void TryConnect()
{ {
//Debug.Log("****Socket*********************TryConnect ---" + IpAddress); //XDebug.Log.l("****Socket*********************TryConnect ---" + IpAddress);
if (IsConnected()) if (IsConnected())
{ {
NetworkStateInfo info = new NetworkStateInfo(); NetworkStateInfo info = new NetworkStateInfo();
@ -725,7 +725,7 @@ public class SocketClient
_LastReconectime = Time.time; _LastReconectime = Time.time;
Debug.Log("****Socket*********************TryReconnect ---" + IpAddress); XDebug.Log.l("****Socket*********************TryReconnect ---" + IpAddress);
@ -739,7 +739,7 @@ public class SocketClient
public void Reconnect() public void Reconnect()
{ {
Debug.Log("****Socket*********************Reconnect ---" + IpAddress); XDebug.Log.l("****Socket*********************Reconnect ---" + IpAddress);
Close(); Close();
@ -748,7 +748,7 @@ public class SocketClient
var ipType = GetIPAddressType(IpAddress); var ipType = GetIPAddressType(IpAddress);
client = null; client = null;
client = new TcpClient(ipType); client = new TcpClient(ipType);
Debug.Log("****Socket*********************NEW ---" + client.Client.Handle); XDebug.Log.l("****Socket*********************NEW ---" + client.Client.Handle);
//client.SendTimeout = 1000; //client.SendTimeout = 1000;
//client.ReceiveTimeout = 1000; //client.ReceiveTimeout = 1000;
client.NoDelay = true; client.NoDelay = true;
@ -804,7 +804,7 @@ public class SocketClient
public void OnReconnectFail() public void OnReconnectFail()
{ {
Debug.Log("****Socket*********************OnReconnectFail ---" + IpAddress); XDebug.Log.l("****Socket*********************OnReconnectFail ---" + IpAddress);
AddStateInfo(NetworkStateType.ReconnectFail, null); AddStateInfo(NetworkStateType.ReconnectFail, null);
} }
@ -816,7 +816,7 @@ public class SocketClient
//检测是否成功的建立了链接。.. //检测是否成功的建立了链接。..
if (client == null || !client.Connected) if (client == null || !client.Connected)
{ {
Debug.Log("****Socket*********************OnReconnect FAILED ---" + IpAddress); XDebug.Log.l("****Socket*********************OnReconnect FAILED ---" + IpAddress);
return; return;
} }
try try
@ -829,11 +829,11 @@ public class SocketClient
client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null); client.GetStream().BeginRead(byteBuffer, 0, MAX_READ, new AsyncCallback(OnRead), null);
AddStateInfo(NetworkStateType.Reconnected, null); AddStateInfo(NetworkStateType.Reconnected, null);
_LastReconectime = 0; _LastReconectime = 0;
Debug.Log("****Socket*********************OnReconnect SUCCESS @"+ client.Client.LocalEndPoint.ToString()); XDebug.Log.l("****Socket*********************OnReconnect SUCCESS @"+ client.Client.LocalEndPoint.ToString());
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Log("****Socket*********************OnReconnect FAILED ---" + e.Message); XDebug.Log.l("****Socket*********************OnReconnect FAILED ---" + e.Message);
} }
} }
@ -870,7 +870,7 @@ public class SocketClient
buffer.Close(); buffer.Close();
//Debug.Log("[SocketClient.m_SendMessage]..."+ msgId); //XDebug.Log.l("[SocketClient.m_SendMessage]..."+ msgId);
} }
/// <summary> /// <summary>

View File

@ -18,7 +18,7 @@ namespace SDK
public AndroidProxy() public AndroidProxy()
{ {
Debug.Log("AndroidProxy INit"); XDebug.Log.l("AndroidProxy INit");
var player = new AndroidJavaClass(CLS_UNITY_PLAYER); var player = new AndroidJavaClass(CLS_UNITY_PLAYER);
currentActivity = player.GetStatic<AndroidJavaObject>("currentActivity"); currentActivity = player.GetStatic<AndroidJavaObject>("currentActivity");
} }
@ -58,7 +58,7 @@ namespace SDK
public override void Pay(SDKPayArgs args) public override void Pay(SDKPayArgs args)
{ {
Debug.Log("consumerId = " + args.roleID + XDebug.Log.l("consumerId = " + args.roleID +
",consumerName= " + args.roleName + ",consumerName= " + args.roleName +
",mhtCurrency= " + args.coinNum + ",mhtCurrency= " + args.coinNum +
",vipLevel= " + args.vip + ",vipLevel= " + args.vip +

View File

@ -169,7 +169,7 @@ namespace SDK
//sdk 埋点 //sdk 埋点
public void CustomEvent(string events, string desc, string type) public void CustomEvent(string events, string desc, string type)
{ {
Debug.Log("sdk打点事件" + events + "|" + desc + "|" + type); XDebug.Log.l("sdk打点事件" + events + "|" + desc + "|" + type);
if(events == null||events == "") if(events == null||events == "")
{ {
return; return;
@ -189,7 +189,7 @@ namespace SDK
//sdk init 回调 //sdk init 回调
public void InitCallback(string data) public void InitCallback(string data)
{ {
Debug.Log("Helper : InitCallback - data: " + data); XDebug.Log.l("Helper : InitCallback - data: " + data);
proxy.PushMessage(new Message proxy.PushMessage(new Message
{ {
msgId = MessageDef.MSG_InitCallback, msgId = MessageDef.MSG_InitCallback,
@ -199,7 +199,7 @@ namespace SDK
//sdk 注册 回调 //sdk 注册 回调
public void RegisterCallback(string data) public void RegisterCallback(string data)
{ {
Debug.Log("Helper : RegisterCallback - data: " + data); XDebug.Log.l("Helper : RegisterCallback - data: " + data);
proxy.PushMessage(new Message proxy.PushMessage(new Message
{ {
msgId = MessageDef.MSG_RegisterCallback, msgId = MessageDef.MSG_RegisterCallback,
@ -209,7 +209,7 @@ namespace SDK
//sdk login 回调 //sdk login 回调
public void LoginCallback(string data) public void LoginCallback(string data)
{ {
Debug.Log("Helper : LoginCallback - data: " + data); XDebug.Log.l("Helper : LoginCallback - data: " + data);
proxy.PushMessage(new Message proxy.PushMessage(new Message
{ {
msgId = MessageDef.MSG_LoginCallback, msgId = MessageDef.MSG_LoginCallback,
@ -219,7 +219,7 @@ namespace SDK
//sdk Pay回调 //sdk Pay回调
public void PayCallback(string data) public void PayCallback(string data)
{ {
Debug.Log("Helper : PayCallback - data: " + data); XDebug.Log.l("Helper : PayCallback - data: " + data);
proxy.PushMessage(new Message proxy.PushMessage(new Message
{ {
msgId = MessageDef.MSG_PayCallback, msgId = MessageDef.MSG_PayCallback,
@ -230,7 +230,7 @@ namespace SDK
//sdk SwitchAccount回调 //sdk SwitchAccount回调
public void SwitchAccountCallback(string data) public void SwitchAccountCallback(string data)
{ {
Debug.Log("Helper : SwitchAccountCallback - data: " + data); XDebug.Log.l("Helper : SwitchAccountCallback - data: " + data);
proxy.PushMessage(new Message proxy.PushMessage(new Message
{ {
msgId = MessageDef.MSG_SwitchAccountCallback, msgId = MessageDef.MSG_SwitchAccountCallback,
@ -241,7 +241,7 @@ namespace SDK
//sdk Logout回调 //sdk Logout回调
public void LogoutCallback(string data) public void LogoutCallback(string data)
{ {
Debug.Log("Helper : LogoutCallback - data: " + data); XDebug.Log.l("Helper : LogoutCallback - data: " + data);
proxy.PushMessage(new Message proxy.PushMessage(new Message
{ {
msgId = MessageDef.MSG_LogoutCallback, msgId = MessageDef.MSG_LogoutCallback,

View File

@ -87,7 +87,7 @@ public class AndroidDeviceInfo
} }
public void DeviceInit() public void DeviceInit()
{ {
Debug.Log("设备信息初始化"); XDebug.Log.l("设备信息初始化");
} }
//设备机型类型 //设备机型类型
public string GetDeviceBrand() public string GetDeviceBrand()

View File

@ -56,7 +56,7 @@ public class NotchScreenUtil
public void Init() public void Init()
{ {
Debug.Log("设备信息初始化"); XDebug.Log.l("设备信息初始化");
} }

View File

@ -73,10 +73,10 @@ public class CheckInputLength : MonoBehaviour
{ {
output += Convert.ToString((int)encodedBytes[byteIndex], 2) + " ";//二进制 output += Convert.ToString((int)encodedBytes[byteIndex], 2) + " ";//二进制
} }
Debug.Log(output); XDebug.Log.l(output);
int byteCount = System.Text.ASCIIEncoding.UTF8.GetByteCount(tempStr); int byteCount = System.Text.ASCIIEncoding.UTF8.GetByteCount(tempStr);
Debug.Log("字节数=" + byteCount); XDebug.Log.l("字节数=" + byteCount);
if (byteCount > 1) if (byteCount > 1)
{ {

View File

@ -185,7 +185,7 @@ namespace ToJ
if ((_maskedSpriteWorldCoordsShader == null) || (_maskedUnlitWorldCoordsShader == null)) if ((_maskedSpriteWorldCoordsShader == null) || (_maskedUnlitWorldCoordsShader == null))
{ {
Debug.Log("Shaders necessary for masking don't seem to be present in the project."); XDebug.Log.l("Shaders necessary for masking don't seem to be present in the project.");
return; return;
} }
SetMesh (); SetMesh ();
@ -194,17 +194,17 @@ namespace ToJ
{ {
if ((maskMappingWorldAxis == MappingAxis.X) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, 0)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.y, invertAxis ? -90 : 90)) > 0.01f))) if ((maskMappingWorldAxis == MappingAxis.X) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, 0)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.y, invertAxis ? -90 : 90)) > 0.01f)))
{ {
Debug.Log("You cannot edit X and Y values of the Mask transform rotation!"); XDebug.Log.l("You cannot edit X and Y values of the Mask transform rotation!");
transform.eulerAngles = new Vector3(0, invertAxis ? 270 : 90, transform.eulerAngles.z); transform.eulerAngles = new Vector3(0, invertAxis ? 270 : 90, transform.eulerAngles.z);
} }
else if ((maskMappingWorldAxis == MappingAxis.Y) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, invertAxis ? -90 : 90)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.z, 0)) > 0.01f))) else if ((maskMappingWorldAxis == MappingAxis.Y) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, invertAxis ? -90 : 90)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.z, 0)) > 0.01f)))
{ {
Debug.Log("You cannot edit X and Z values of the Mask transform rotation!"); XDebug.Log.l("You cannot edit X and Z values of the Mask transform rotation!");
transform.eulerAngles = new Vector3(invertAxis ? -90 : 90, transform.eulerAngles.y, 0); transform.eulerAngles = new Vector3(invertAxis ? -90 : 90, transform.eulerAngles.y, 0);
} }
else if ((maskMappingWorldAxis == MappingAxis.Z) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, 0)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.y, (invertAxis ? -180 : 0))) > 0.01f))) else if ((maskMappingWorldAxis == MappingAxis.Z) && ((Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.x, 0)) > 0.01f) || (Mathf.Abs(Mathf.DeltaAngle(transform.eulerAngles.y, (invertAxis ? -180 : 0))) > 0.01f)))
{ {
Debug.Log("You cannot edit X and Y values of the Mask transform rotation!"); XDebug.Log.l("You cannot edit X and Y values of the Mask transform rotation!");
transform.eulerAngles = new Vector3(0, invertAxis ? -180 : 0, transform.eulerAngles.z); transform.eulerAngles = new Vector3(0, invertAxis ? -180 : 0, transform.eulerAngles.z);
} }
@ -255,13 +255,13 @@ namespace ToJ
if ((material.shader.ToString() == _maskedSpriteWorldCoordsShader.ToString()) && if ((material.shader.ToString() == _maskedSpriteWorldCoordsShader.ToString()) &&
(material.shader.GetInstanceID() != _maskedSpriteWorldCoordsShader.GetInstanceID())) (material.shader.GetInstanceID() != _maskedSpriteWorldCoordsShader.GetInstanceID()))
{ {
Debug.Log("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied."); XDebug.Log.l("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied.");
_maskedSpriteWorldCoordsShader = null; _maskedSpriteWorldCoordsShader = null;
} }
if ((material.shader.ToString() == _maskedUnlitWorldCoordsShader.ToString()) && if ((material.shader.ToString() == _maskedUnlitWorldCoordsShader.ToString()) &&
(material.shader.GetInstanceID() != _maskedUnlitWorldCoordsShader.GetInstanceID())) (material.shader.GetInstanceID() != _maskedUnlitWorldCoordsShader.GetInstanceID()))
{ {
Debug.Log("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied."); XDebug.Log.l("There seems to be more than one masked shader in the project with the same display name, and it's preventing the mask from being properly applied.");
_maskedUnlitWorldCoordsShader = null; _maskedUnlitWorldCoordsShader = null;
} }

View File

@ -38,14 +38,14 @@ namespace UnityEngine.UI.Extensions
{ {
base.Awake(); base.Awake();
rectTrans = GetComponent<RectTransform>(); rectTrans = GetComponent<RectTransform>();
Debug.Log("rectTrans:" + rectTrans); XDebug.Log.l("rectTrans:" + rectTrans);
OnRectTransformDimensionsChange(); OnRectTransformDimensionsChange();
} }
protected override void OnEnable() protected override void OnEnable()
{ {
base.OnEnable(); base.OnEnable();
rectTrans = GetComponent<RectTransform>(); rectTrans = GetComponent<RectTransform>();
Debug.Log("rectTrans:" + rectTrans); XDebug.Log.l("rectTrans:" + rectTrans);
OnRectTransformDimensionsChange(); OnRectTransformDimensionsChange();
} }
/// <summary> /// <summary>
@ -68,7 +68,7 @@ namespace UnityEngine.UI.Extensions
for (int index = 0; index < verts.Count; index++) for (int index = 0; index < verts.Count; index++)
{ {
var uiVertex = verts[index]; var uiVertex = verts[index];
//Debug.Log (); //XDebug.Log.l ();
uiVertex.position.y += curveForText.Evaluate(rectTrans.rect.width * rectTrans.pivot.x + uiVertex.position.x) * curveMultiplier; uiVertex.position.y += curveForText.Evaluate(rectTrans.rect.width * rectTrans.pivot.x + uiVertex.position.x) * curveMultiplier;
verts[index] = uiVertex; verts[index] = uiVertex;
} }
@ -105,7 +105,7 @@ namespace UnityEngine.UI.Extensions
for (int index = 0; index < verts.Count; index++) for (int index = 0; index < verts.Count; index++)
{ {
var uiVertex = verts[index]; var uiVertex = verts[index];
//Debug.Log (); //XDebug.Log.l ();
uiVertex.position.y += curveForText.Evaluate(rectTrans.rect.width * rectTrans.pivot.x + uiVertex.position.x) * curveMultiplier; uiVertex.position.y += curveForText.Evaluate(rectTrans.rect.width * rectTrans.pivot.x + uiVertex.position.x) * curveMultiplier;
verts[index] = uiVertex; verts[index] = uiVertex;
} }

View File

@ -91,7 +91,7 @@ namespace UnityEngine.UI.Extensions
// //
protected void ApplyShadow(List<UIVertex> verts, Color32 color, int start, int end, float x, float y) protected void ApplyShadow(List<UIVertex> verts, Color32 color, int start, int end, float x, float y)
{ {
//Debug.Log("verts count: "+verts.Count); //XDebug.Log.l("verts count: "+verts.Count);
int num = verts.Count * 2; int num = verts.Count * 2;
if (verts.Capacity < num) if (verts.Capacity < num)
{ {
@ -103,7 +103,7 @@ namespace UnityEngine.UI.Extensions
verts.Add(uIVertex); verts.Add(uIVertex);
Vector3 position = uIVertex.position; Vector3 position = uIVertex.position;
//Debug.Log("vertex pos: "+position); //XDebug.Log.l("vertex pos: "+position);
position.x += x; position.x += x;
position.y += y; position.y += y;
uIVertex.position = position; uIVertex.position = position;

View File

@ -89,7 +89,6 @@ public class TapDB
} }
private static void TapDB_nativeOnResume(){ private static void TapDB_nativeOnResume(){
Debug.Log ("TapDB_nativeOnResume");
AndroidJavaObject activity = getUnityClass().GetStatic<AndroidJavaObject>("currentActivity"); AndroidJavaObject activity = getUnityClass().GetStatic<AndroidJavaObject>("currentActivity");
getAgent().CallStatic("onResume", activity); getAgent().CallStatic("onResume", activity);
} }

View File

@ -53,16 +53,16 @@ namespace TapDBMiniJSON {
// //
// var dict = Json.Deserialize(jsonString) as Dictionary<string,object>; // var dict = Json.Deserialize(jsonString) as Dictionary<string,object>;
// //
// Debug.Log("deserialized: " + dict.GetType()); // XDebug.Log.l("deserialized: " + dict.GetType());
// Debug.Log("dict['array'][0]: " + ((List<object>) dict["array"])[0]); // XDebug.Log.l("dict['array'][0]: " + ((List<object>) dict["array"])[0]);
// Debug.Log("dict['string']: " + (string) dict["string"]); // XDebug.Log.l("dict['string']: " + (string) dict["string"]);
// Debug.Log("dict['float']: " + (double) dict["float"]); // floats come out as doubles // XDebug.Log.l("dict['float']: " + (double) dict["float"]); // floats come out as doubles
// Debug.Log("dict['int']: " + (long) dict["int"]); // ints come out as longs // XDebug.Log.l("dict['int']: " + (long) dict["int"]); // ints come out as longs
// Debug.Log("dict['unicode']: " + (string) dict["unicode"]); // XDebug.Log.l("dict['unicode']: " + (string) dict["unicode"]);
// //
// var str = Json.Serialize(dict); // var str = Json.Serialize(dict);
// //
// Debug.Log("serialized: " + str); // XDebug.Log.l("serialized: " + str);
// } // }
// } // }

View File

@ -94,21 +94,21 @@ namespace GameLogic {
{ {
if (luaFunction != null) if (luaFunction != null)
{ {
Debug.Log("ResourcesManager LoadAssetAsync luaFunc"); XDebug.Log.l("ResourcesManager LoadAssetAsync luaFunc");
luaFunction.Call(name, obj); luaFunction.Call(name, obj);
} }
else { else {
Debug.Log("ResourcesManager LoadAssetAsync luaFunc ==null"); XDebug.Log.l("ResourcesManager LoadAssetAsync luaFunc ==null");
} }
}); });
} }
public void PreLoadAssetAsync(string assetName, LuaFunction luaFunc) public void PreLoadAssetAsync(string assetName, LuaFunction luaFunc)
{ {
//Debug.Log("预加载资源:" + assetName); //XDebug.Log.l("预加载资源:" + assetName);
if (File.Exists(AppConst.PersistentDataPath + assetName) && PlayerPrefs.GetInt(assetName + "_IsPreLoad", 0) == 1) if (File.Exists(AppConst.PersistentDataPath + assetName) && PlayerPrefs.GetInt(assetName + "_IsPreLoad", 0) == 1)
{ {
//Debug.Log("预加载资源已存在"); //XDebug.Log.l("预加载资源已存在");
if (luaFunc != null) if (luaFunc != null)
{ {
luaFunc.Call(true); luaFunc.Call(true);
@ -116,12 +116,12 @@ namespace GameLogic {
}else }else
{ {
string downLoadURL = VersionManager.Instance.GetVersionInfo("resUrl") + AppConst.PlatformPath + "/"; string downLoadURL = VersionManager.Instance.GetVersionInfo("resUrl") + AppConst.PlatformPath + "/";
//Debug.Log("预加载资源路径:"+downLoadURL); //XDebug.Log.l("预加载资源路径:"+downLoadURL);
ResourceDownloadManager.Instance.StartDownload(assetName, downLoadURL, "", (string name, DownLoadProgress dp) => { ResourceDownloadManager.Instance.StartDownload(assetName, downLoadURL, "", (string name, DownLoadProgress dp) => {
//Debug.LogFormat("预加载资源进度:{0}/{1}", dp.Size, dp.TotalSize); //Debug.LogFormat("预加载资源进度:{0}/{1}", dp.Size, dp.TotalSize);
}, (string name, bool isOk) => }, (string name, bool isOk) =>
{ {
//Debug.Log("预加载资源完成:" + isOk); //XDebug.Log.l("预加载资源完成:" + isOk);
PlayerPrefs.SetInt(assetName + "_IsPreLoad", 1); PlayerPrefs.SetInt(assetName + "_IsPreLoad", 1);
if (luaFunc != null) if (luaFunc != null)
{ {

View File

@ -89,12 +89,12 @@ namespace GameLogic
else else
{ {
string url = AppConst.FilePathEx + VersionsStreamFilePath; string url = AppConst.FilePathEx + VersionsStreamFilePath;
Debug.Log("[VersionLoader Start ]@" + url); XDebug.Log.l("[VersionLoader Start ]@" + url);
WWW _www = new WWW(url); WWW _www = new WWW(url);
yield return _www; yield return _www;
if (string.IsNullOrEmpty(_www.error)) if (string.IsNullOrEmpty(_www.error))
{ {
Debug.Log("[VersionLoader OK ]=" + _www.text); XDebug.Log.l("[VersionLoader OK ]=" + _www.text);
VersionInfo = new Version(_www.text); VersionInfo = new Version(_www.text);
} }
else else

View File

@ -131,12 +131,12 @@ namespace ResMgr {
} }
public IEnumerator LoadTextureFromStream(string name, LuaFunction luaFunction) public IEnumerator LoadTextureFromStream(string name, LuaFunction luaFunction)
{ {
Debug.Log(Application.streamingAssetsPath + "/Res/" + name + ".png"); XDebug.Log.l(Application.streamingAssetsPath + "/Res/" + name + ".png");
UnityWebRequest www = UnityWebRequestTexture.GetTexture(Application.streamingAssetsPath + "/Res/"+ name + ".png"); UnityWebRequest www = UnityWebRequestTexture.GetTexture(Application.streamingAssetsPath + "/Res/"+ name + ".png");
yield return www.SendWebRequest(); yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError) if (www.isNetworkError || www.isHttpError)
{ {
Debug.Log(www.error); XDebug.Log.l(www.error);
if (luaFunction != null) if (luaFunction != null)
{ {
luaFunction.Call(false); luaFunction.Call(false);
@ -158,12 +158,12 @@ namespace ResMgr {
} }
public IEnumerator LoadTextFromStream(string name, LuaFunction luaFunction) public IEnumerator LoadTextFromStream(string name, LuaFunction luaFunction)
{ {
Debug.Log(Application.streamingAssetsPath + "/Res/" + name + ".txt"); XDebug.Log.l(Application.streamingAssetsPath + "/Res/" + name + ".txt");
UnityWebRequest www = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/" + name + ".txt"); UnityWebRequest www = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/" + name + ".txt");
yield return www.SendWebRequest(); yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError) if (www.isNetworkError || www.isHttpError)
{ {
Debug.Log(www.error); XDebug.Log.l(www.error);
if (luaFunction != null) if (luaFunction != null)
{ {
luaFunction.Call(false); luaFunction.Call(false);

View File

@ -285,7 +285,7 @@ namespace ResMgr
{ {
if (tmpLoader == null) if (tmpLoader == null)
{ {
Debug.Log("RunttimeResLoader LoadAssetAsync tmpLoader == null abname: " + name); XDebug.Log.l("RunttimeResLoader LoadAssetAsync tmpLoader == null abname: " + name);
} }
if (tmpLoader.AbLoaderState == ABLoaderState.Failed) if (tmpLoader.AbLoaderState == ABLoaderState.Failed)

View File

@ -477,7 +477,7 @@ namespace ResUpdate
if (localCrc == fileCRC) if (localCrc == fileCRC)
{ {
FileUtil.MoveFile(fileLocalCache, savePath); FileUtil.MoveFile(fileLocalCache, savePath);
if (BaseLogger.isDebug) Debug.Log(string.Format("Finish download success file {0}", fileName)); if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Finish download success file {0}", fileName));
} }
else else
{ {
@ -490,7 +490,7 @@ namespace ResUpdate
else else
{ {
FileUtil.MoveFile(fileLocalCache, savePath); FileUtil.MoveFile(fileLocalCache, savePath);
if (BaseLogger.isDebug) Debug.Log(string.Format("Finish download success file {0}", fileName)); if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Finish download success file {0}", fileName));
} }
} }
} }

View File

@ -246,7 +246,7 @@ namespace ResUpdate
if (finishedRequest.ContainsKey(file)) if (finishedRequest.ContainsKey(file))
{ {
if (BaseLogger.isDebug) Debug.Log(string.Format("Re download file: {0}.", file)); if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Re download file: {0}.", file));
finishedRequest.Remove(file); finishedRequest.Remove(file);
} }
@ -274,7 +274,7 @@ namespace ResUpdate
if (finishedRequest.ContainsKey(file)) if (finishedRequest.ContainsKey(file))
{ {
if (BaseLogger.isDebug) Debug.Log(string.Format("Re download file: {0}.", file)); if (BaseLogger.isDebug) XDebug.Log.l(string.Format("Re download file: {0}.", file));
finishedRequest.Remove(file); finishedRequest.Remove(file);
} }
@ -347,7 +347,7 @@ namespace ResUpdate
if (curNetworkStatus != state) if (curNetworkStatus != state)
{ {
curNetworkStatus = state; curNetworkStatus = state;
if (BaseLogger.isDebug) Debug.Log(string.Format("curNetworkStatus changed:{0}", curNetworkStatus)); if (BaseLogger.isDebug) XDebug.Log.l(string.Format("curNetworkStatus changed:{0}", curNetworkStatus));
if (!IsNetworkReachable) if (!IsNetworkReachable)
{ {

View File

@ -317,7 +317,7 @@ namespace ResUpdate
// 获取config // 获取config
string conUrl = downLoadURL + AppConst.GameConfigFile; string conUrl = downLoadURL + AppConst.GameConfigFile;
Debug.Log("Download_Resouces_Url:" + conUrl); XDebug.Log.l("Download_Resouces_Url:" + conUrl);
UnityWebRequest request0 = UnityWebRequest.Get(conUrl); UnityWebRequest request0 = UnityWebRequest.Get(conUrl);
request0.certificateHandler = new AcceptAllCertificatesSignedWithASpecificPublicKey(); request0.certificateHandler = new AcceptAllCertificatesSignedWithASpecificPublicKey();
yield return request0.SendWebRequest(); yield return request0.SendWebRequest();
@ -328,7 +328,7 @@ namespace ResUpdate
} }
else else
{ {
Debug.Log("www.text.config:" + request0.downloadHandler.text); XDebug.Log.l("www.text.config:" + request0.downloadHandler.text);
ConfigManager.Instance.SetNetInfo(request0.downloadHandler.text); ConfigManager.Instance.SetNetInfo(request0.downloadHandler.text);
// 初始化语言 // 初始化语言
SLanguageMoreLanguageMgr.Instance.InitData(); SLanguageMoreLanguageMgr.Instance.InitData();
@ -336,7 +336,7 @@ namespace ResUpdate
// 获取version // 获取version
string resUrl = downLoadURL + AppConst.GameVersionFile; string resUrl = downLoadURL + AppConst.GameVersionFile;
Debug.Log("Download_Resouces_Url:" + resUrl); XDebug.Log.l("Download_Resouces_Url:" + resUrl);
UnityWebRequest request = UnityWebRequest.Get(resUrl); UnityWebRequest request = UnityWebRequest.Get(resUrl);
request.certificateHandler = new AcceptAllCertificatesSignedWithASpecificPublicKey(); request.certificateHandler = new AcceptAllCertificatesSignedWithASpecificPublicKey();
@ -348,7 +348,7 @@ namespace ResUpdate
} }
else else
{ {
Debug.Log("www.text.version:" + request.downloadHandler.text); XDebug.Log.l("www.text.version:" + request.downloadHandler.text);
Hashtable table = MiniJSON.jsonDecode(request.downloadHandler.text) as Hashtable; Hashtable table = MiniJSON.jsonDecode(request.downloadHandler.text) as Hashtable;
if (table == null) if (table == null)
@ -371,12 +371,12 @@ namespace ResUpdate
string version = table["version"] as string; string version = table["version"] as string;
int result = VersionManager.VersionCompare(version, localVersion); int result = VersionManager.VersionCompare(version, localVersion);
//下载链接 //下载链接
Debug.Log(string.Format("ResUpdate=====>InitDownLoadURL,Version:{0},loadVersion:{1}", version, localVersion)); XDebug.Log.l(string.Format("ResUpdate=====>InitDownLoadURL,Version:{0},loadVersion:{1}", version, localVersion));
Debug.Log(string.Format("Version Compare result:{0}", result)); XDebug.Log.l(string.Format("Version Compare result:{0}", result));
//如果版本号一致,就不进行更新了 //如果版本号一致,就不进行更新了
if (result == 0) if (result == 0)
{ {
Debug.Log(string.Format("version:{0},版本号一致,更新完成", version)); XDebug.Log.l(string.Format("version:{0},版本号一致,更新完成", version));
UpdateSuccess(); UpdateSuccess();
} }
else else
@ -416,7 +416,7 @@ namespace ResUpdate
/// <param name="isSuccess"></param> /// <param name="isSuccess"></param>
void DownLoadVersionFilesFinishCallBack(string fileName, bool isSuccess) void DownLoadVersionFilesFinishCallBack(string fileName, bool isSuccess)
{ {
Debug.Log(string.Format("ResUpdate=====>DownLoadVersionFilesFinishCallBack,FileName:{0},IsSuccess:{1}", fileName, isSuccess)); XDebug.Log.l(string.Format("ResUpdate=====>DownLoadVersionFilesFinishCallBack,FileName:{0},IsSuccess:{1}", fileName, isSuccess));
if (isSuccess) if (isSuccess)
{ {
CalculateDownLoadFiles(); CalculateDownLoadFiles();

View File

@ -142,7 +142,7 @@ namespace GameLogic
} }
private void ReadJson(string strjson) private void ReadJson(string strjson)
{ {
Debug.Log(strjson); XDebug.Log.l(strjson);
data = JsonMapper.ToObject<Hashtable>(strjson); data = JsonMapper.ToObject<Hashtable>(strjson);
} }
@ -192,7 +192,7 @@ namespace GameLogic
case 1: languageStr = "英文"; break; case 1: languageStr = "英文"; break;
case 2: languageStr = "越南语"; break; case 2: languageStr = "越南语"; break;
} }
Debug.Log("当前语言是:" + languageStr); XDebug.Log.l("当前语言是:" + languageStr);
} }
/// <summary> /// <summary>
@ -227,13 +227,13 @@ namespace GameLogic
else else
{ {
//取默认值 //取默认值
Debug.Log("language.txt is no exist get the default"); XDebug.Log.l("language.txt is no exist get the default");
} }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
Debug.Log(ex.ToString()); XDebug.Log.l(ex.ToString());
} }
} }
@ -262,7 +262,7 @@ namespace GameLogic
} }
catch (Exception e) catch (Exception e)
{ {
Debug.Log(e.ToString()); XDebug.Log.l(e.ToString());
} }
return languageThrans; return languageThrans;

View File

@ -39,12 +39,12 @@ namespace GameLogic
public IEnumerator LoadFromStream(Action<Sprite> act) public IEnumerator LoadFromStream(Action<Sprite> act)
{ {
Debug.Log(Application.streamingAssetsPath + "/Res/PackConfig.txt"); XDebug.Log.l(Application.streamingAssetsPath + "/Res/PackConfig.txt");
UnityWebRequest uwr = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/PackConfig.txt"); UnityWebRequest uwr = UnityWebRequest.Get(Application.streamingAssetsPath + "/Res/PackConfig.txt");
yield return uwr.SendWebRequest(); yield return uwr.SendWebRequest();
if (uwr.isNetworkError || uwr.isHttpError) if (uwr.isNetworkError || uwr.isHttpError)
{ {
Debug.Log(uwr.error); XDebug.Log.l(uwr.error);
if (act != null) if (act != null)
{ {
act(null); act(null);
@ -59,7 +59,7 @@ namespace GameLogic
yield return www.SendWebRequest(); yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError) if (www.isNetworkError || www.isHttpError)
{ {
Debug.Log(www.error); XDebug.Log.l(www.error);
if (act != null) if (act != null)
{ {
act(null); act(null);
@ -67,7 +67,7 @@ namespace GameLogic
} }
else else
{ {
Debug.Log("load success"); XDebug.Log.l("load success");
Texture2D tex = ((DownloadHandlerTexture)www.downloadHandler).texture; Texture2D tex = ((DownloadHandlerTexture)www.downloadHandler).texture;
Sprite sp = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0)); Sprite sp = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0));
if (act != null) if (act != null)

View File

@ -588,7 +588,7 @@ public class MiniJSON
protected static bool serializeValue( object value, StringBuilder builder ) protected static bool serializeValue( object value, StringBuilder builder )
{ {
//Type t = value.GetType(); //Type t = value.GetType();
//UnityEngine.Debug.Log("type: " + t.ToString() + " isArray: " + t.IsArray); //UnityEngine.XDebug.Log.l("type: " + t.ToString() + " isArray: " + t.IsArray);
if( value == null ) if( value == null )
{ {

View File

@ -38,7 +38,7 @@ public class UIBgAdaptive : MonoBehaviour
float ft = Mathf.Pow(10, avg); float ft = Mathf.Pow(10, avg);
float curHeight = Screen.height / ft; float curHeight = Screen.height / ft;
float curWidth = curHeight /1920f * 1080f; float curWidth = curHeight /1920f * 1080f;
//Debug.Log("Screen.height " + Screen.height+ " curWidth "+ curWidth); //XDebug.Log.l("Screen.height " + Screen.height+ " curWidth "+ curWidth);
bgList[i].GetComponent<RectTransform>().sizeDelta = new Vector2(curWidth, curHeight); bgList[i].GetComponent<RectTransform>().sizeDelta = new Vector2(curWidth, curHeight);
} }
else else