mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 09:58:02 +08:00
- Wrote the CacheObject class to replace MemberInfoHolder, resulting code is better perfomance and much easier to read. - Added pages to Object Reflection window, now limited to 20 members per page to improve performance further.
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace Explorer
|
|
{
|
|
public class CacheIl2CppObject : CacheObject
|
|
{
|
|
public override void DrawValue(Rect window, float width)
|
|
{
|
|
var label = ValueType ?? Value.ToString();
|
|
if (!label.Contains(ValueType))
|
|
{
|
|
label += $" ({ValueType})";
|
|
}
|
|
if (Value is UnityEngine.Object unityObj)
|
|
{
|
|
label = unityObj.name + " | " + label;
|
|
}
|
|
|
|
GUI.skin.button.alignment = TextAnchor.MiddleLeft;
|
|
if (GUILayout.Button("<color=yellow>" + label + "</color>", new GUILayoutOption[] { GUILayout.MaxWidth(width) }))
|
|
{
|
|
WindowManager.InspectObject(Value, out bool _);
|
|
}
|
|
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
|
|
}
|
|
|
|
public override void SetValue()
|
|
{
|
|
throw new NotImplementedException("TODO");
|
|
}
|
|
}
|
|
}
|