You've already forked Dpr-ScriptsOnly
mirror of
https://github.com/izzy2lost/Dpr-ScriptsOnly.git
synced 2026-03-10 11:49:05 -07:00
35 lines
882 B
C#
35 lines
882 B
C#
using UnityEngine;
|
|
|
|
namespace SmartPoint.AssetAssistant
|
|
{
|
|
public class LogMessage
|
|
{
|
|
public const int MaxLogCount = 256;
|
|
public static int lastID;
|
|
public static int nextID;
|
|
public int id;
|
|
public string condition;
|
|
public string stackTrace;
|
|
public LogType type;
|
|
|
|
public LogMessage(int id)
|
|
{
|
|
this.id = id;
|
|
lastID = -1;
|
|
nextID = 0;
|
|
}
|
|
|
|
public void AdvanceAndSet(string condition, string stackTrace, LogType type)
|
|
{
|
|
lastID = nextID;
|
|
nextID++;
|
|
var n = nextID + (MaxLogCount - 1);
|
|
if (nextID >= 0)
|
|
n = nextID;
|
|
nextID -= (int)(n & 0xFFFFFF00);
|
|
this.condition = condition;
|
|
this.stackTrace = stackTrace;
|
|
this.type = type;
|
|
}
|
|
}
|
|
} |