12345678910111213141516171819202122232425262728293031 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class DebugLog {
- private string logString;
- private string stackTrace;
- private LogType logType;
- public static int ct = 0;
- private int curIndex = 0;
- public DebugLog(string logStr, string sTrace, LogType lType)
- {
- this.logString = logStr;
- this.stackTrace = sTrace;
- this.logType = lType;
- curIndex = ct;
- ct++;
- }
- public override string ToString()
- {
-
- if (this.logString.Length > 300) {
- return this.logString.Substring (0, Mathf.Min (this.logString.Length - 1, 300)) + " ## " + curIndex;
- } else {
- return this.logString + " ## " + curIndex;
- }
- }
- }
|