46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace DebuggingEssentials
|
|
{
|
|
public class MemoryObject : IComparable<MemoryObject>
|
|
{
|
|
public int instanceId;
|
|
|
|
public HideFlags hideFlags;
|
|
|
|
public bool isPrefab;
|
|
|
|
public string name;
|
|
|
|
public string nameAndTime;
|
|
|
|
public CompareResult compareResult;
|
|
|
|
public MemoryObject(string name, int instanceId, HideFlags hideFlags, bool isPrefab, CompareResult compareResult = CompareResult.New)
|
|
{
|
|
this.compareResult = compareResult;
|
|
this.instanceId = instanceId;
|
|
this.hideFlags = hideFlags;
|
|
this.isPrefab = isPrefab;
|
|
this.name = name;
|
|
nameAndTime = name + Time.realtimeSinceStartup;
|
|
}
|
|
|
|
public MemoryObject(MemoryObject memoryObject, CompareResult compareResult = CompareResult.New)
|
|
{
|
|
this.compareResult = compareResult;
|
|
instanceId = memoryObject.instanceId;
|
|
hideFlags = memoryObject.hideFlags;
|
|
isPrefab = memoryObject.isPrefab;
|
|
name = memoryObject.name;
|
|
nameAndTime = memoryObject.nameAndTime;
|
|
}
|
|
|
|
public int CompareTo(MemoryObject other)
|
|
{
|
|
return string.Compare(nameAndTime, other.nameAndTime);
|
|
}
|
|
}
|
|
}
|