public void AddLog(XDebugChannel channel, string log1, string log2 = null, string log3 = null, string log4 = null, string log5 = null, string log6 = null, XDebugColor color = XDebugColor.XDebug_None) { if (this._showLog && this._platform != null && !this._platform.IsPublish() && (this._OutputChannels & (int)channel) > 0) { this._buffer.Length = 0; this._buffer.Append(log1).Append(log2).Append(log3).Append(log4).Append(log5).Append(log6); if (color == XDebugColor.XDebug_Green) { this._buffer.Insert(0, "<color=green>"); this._buffer.Append("</color>"); } if (this._showTimeStick) { if (Thread.CurrentThread.ManagedThreadId == XSingleton <XUpdater> .singleton.ManagedThreadId) { this._buffer.Append(" (at Frame: ").Append(Time.frameCount).Append(" sec: ").Append(Time.realtimeSinceStartup.ToString("F3")).Append(')'); } else if (string.IsNullOrEmpty(Thread.CurrentThread.Name)) { this._buffer.Append(" (from anonymous thread").Append(" with id ").Append(Thread.CurrentThread.ManagedThreadId).Append(")"); } else { this._buffer.Append(" (from thread ").Append(Thread.CurrentThread.Name).Append(" with id ").Append(Thread.CurrentThread.ManagedThreadId).Append(")"); } } if (color == XDebugColor.XDebug_Red) { Debug.LogError(this._buffer); return; } if (color == XDebugColor.XDebug_Yellow) { Debug.LogWarning(this._buffer); return; } Debug.Log(this._buffer); } }
public void AddLog(string log1, string log2 = null, string log3 = null, string log4 = null, string log5 = null, string log6 = null, XDebugColor color = XDebugColor.XDebug_None) { if (this._platform != null && !this._platform.IsPublish()) { this.AddLog(XDebugChannel.XDebug_Default, log1, log2, log3, log4, log5, log6, color); } }