2020-08-07 22:19:03 +10:00
|
|
|
|
using System;
|
2020-08-18 17:11:58 +10:00
|
|
|
|
using System.CodeDom;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using MelonLoader;
|
|
|
|
|
using UnhollowerBaseLib;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Explorer
|
|
|
|
|
{
|
2020-08-13 00:06:39 +10:00
|
|
|
|
public class ReflectionWindow : UIWindow
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-28 00:45:34 +10:00
|
|
|
|
public override string Name { get => $"Reflection Inspector ({ObjectType.Name})"; }
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
public Type ObjectType;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
private CacheObjectBase[] m_cachedMembers;
|
|
|
|
|
private CacheObjectBase[] m_cachedMemberFiltered;
|
2020-08-22 00:16:05 +10:00
|
|
|
|
private int m_pageOffset;
|
2020-08-22 17:17:11 +10:00
|
|
|
|
private int m_limitPerPage = 20;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
|
|
|
|
private bool m_autoUpdate = false;
|
|
|
|
|
private string m_search = "";
|
2020-08-29 21:15:54 +10:00
|
|
|
|
public MemberTypes m_filter = MemberTypes.Property;
|
2020-08-24 01:42:19 +10:00
|
|
|
|
private bool m_hideFailedReflection = false;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
// some extra caching
|
|
|
|
|
private UnityEngine.Object m_uObj;
|
|
|
|
|
private Component m_component;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
|
|
|
|
public override void Init()
|
|
|
|
|
{
|
2020-08-18 17:11:58 +10:00
|
|
|
|
var type = ReflectionHelpers.GetActualType(Target);
|
2020-08-07 22:19:03 +10:00
|
|
|
|
if (type == null)
|
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
MelonLogger.Log($"Could not get underlying type for object..? Type: {Target?.GetType().Name}, ToString: {Target?.ToString()}");
|
|
|
|
|
DestroyWindow();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
ObjectType = type;
|
|
|
|
|
|
|
|
|
|
var types = ReflectionHelpers.GetAllBaseTypes(Target);
|
2020-08-22 00:16:05 +10:00
|
|
|
|
CacheMembers(types);
|
2020-08-18 17:11:58 +10:00
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
if (Target is Il2CppSystem.Object ilObject)
|
|
|
|
|
{
|
|
|
|
|
var unityObj = ilObject.TryCast<UnityEngine.Object>();
|
|
|
|
|
if (unityObj)
|
|
|
|
|
{
|
|
|
|
|
m_uObj = unityObj;
|
|
|
|
|
|
|
|
|
|
var component = ilObject.TryCast<Component>();
|
|
|
|
|
if (component)
|
|
|
|
|
{
|
|
|
|
|
m_component = component;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
m_filter = MemberTypes.All;
|
|
|
|
|
m_autoUpdate = true;
|
|
|
|
|
Update();
|
|
|
|
|
|
|
|
|
|
m_autoUpdate = false;
|
|
|
|
|
m_filter = MemberTypes.Property;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Update()
|
|
|
|
|
{
|
2020-08-22 00:16:05 +10:00
|
|
|
|
m_cachedMemberFiltered = m_cachedMembers.Where(x => ShouldProcessMember(x)).ToArray();
|
|
|
|
|
|
2020-08-07 22:19:03 +10:00
|
|
|
|
if (m_autoUpdate)
|
|
|
|
|
{
|
|
|
|
|
UpdateValues();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-22 00:16:05 +10:00
|
|
|
|
private void UpdateValues()
|
2020-08-18 17:11:58 +10:00
|
|
|
|
{
|
2020-08-22 00:16:05 +10:00
|
|
|
|
foreach (var member in m_cachedMemberFiltered)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-22 17:17:11 +10:00
|
|
|
|
member.UpdateValue();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
2020-08-18 17:11:58 +10:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
private bool ShouldProcessMember(CacheObjectBase holder)
|
2020-08-18 17:11:58 +10:00
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
if (m_filter != MemberTypes.All && m_filter != holder.MemberInfoType) return false;
|
2020-08-18 17:11:58 +10:00
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
if (!string.IsNullOrEmpty(holder.ReflectionException) && m_hideFailedReflection) return false;
|
|
|
|
|
|
2020-08-22 00:16:05 +10:00
|
|
|
|
if (m_search == "" || holder.MemberInfo == null) return true;
|
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
return holder.FullName
|
2020-08-22 00:16:05 +10:00
|
|
|
|
.ToLower()
|
|
|
|
|
.Contains(m_search.ToLower());
|
2020-08-18 17:11:58 +10:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
private void CacheMembers(Type[] types)
|
2020-08-18 17:11:58 +10:00
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
var list = new List<CacheObjectBase>();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
var names = new List<string>();
|
|
|
|
|
|
|
|
|
|
foreach (var declaringType in types)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-22 00:16:05 +10:00
|
|
|
|
MemberInfo[] infos;
|
2020-08-22 17:17:11 +10:00
|
|
|
|
string exception = null;
|
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
try
|
|
|
|
|
{
|
2020-08-22 17:17:11 +10:00
|
|
|
|
infos = declaringType.GetMembers(ReflectionHelpers.CommonFlags);
|
2020-08-18 17:11:58 +10:00
|
|
|
|
}
|
2020-08-22 00:16:05 +10:00
|
|
|
|
catch
|
2020-08-18 17:11:58 +10:00
|
|
|
|
{
|
2020-08-22 17:17:11 +10:00
|
|
|
|
MelonLogger.Log("Exception getting members for type: " + declaringType.Name);
|
2020-08-22 00:16:05 +10:00
|
|
|
|
continue;
|
2020-08-18 17:11:58 +10:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
object target = Target;
|
2020-08-29 21:15:54 +10:00
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
if (target is Il2CppSystem.Object ilObject)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-22 00:16:05 +10:00
|
|
|
|
try
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-22 17:17:11 +10:00
|
|
|
|
target = ilObject.Il2CppCast(declaringType);
|
2020-08-22 00:16:05 +10:00
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
2020-08-18 17:11:58 +10:00
|
|
|
|
{
|
2020-08-22 17:17:11 +10:00
|
|
|
|
exception = ReflectionHelpers.ExceptionToString(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (var member in infos)
|
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
if (member.MemberType == MemberTypes.Field || member.MemberType == MemberTypes.Property || member.MemberType == MemberTypes.Method)
|
2020-08-22 17:17:11 +10:00
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
if (member.Name.Contains("Il2CppType") || member.Name.StartsWith("get_"))
|
|
|
|
|
continue;
|
2020-08-22 17:17:11 +10:00
|
|
|
|
|
2020-08-24 01:42:19 +10:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var name = member.DeclaringType.Name + "." + member.Name;
|
|
|
|
|
if (names.Contains(name)) continue;
|
|
|
|
|
names.Add(name);
|
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
var cached = CacheObjectBase.GetCacheObject(null, member, target);
|
2020-08-24 01:42:19 +10:00
|
|
|
|
if (cached != null)
|
|
|
|
|
{
|
|
|
|
|
list.Add(cached);
|
|
|
|
|
cached.ReflectionException = exception;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
MelonLogger.LogWarning($"Exception caching member {declaringType.Name}.{member.Name}!");
|
|
|
|
|
MelonLogger.Log(e.ToString());
|
2020-08-24 01:42:19 +10:00
|
|
|
|
}
|
2020-08-18 17:11:58 +10:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-22 00:16:05 +10:00
|
|
|
|
m_cachedMembers = list.ToArray();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
// =========== GUI DRAW =========== //
|
|
|
|
|
|
2020-08-07 22:19:03 +10:00
|
|
|
|
public override void WindowFunction(int windowID)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Header();
|
|
|
|
|
|
|
|
|
|
GUILayout.BeginArea(new Rect(5, 25, m_rect.width - 10, m_rect.height - 35), GUI.skin.box);
|
|
|
|
|
|
|
|
|
|
GUILayout.BeginHorizontal(null);
|
2020-08-24 01:42:19 +10:00
|
|
|
|
GUILayout.Label("<b>Type:</b> <color=cyan>" + ObjectType.FullName + "</color>", null);
|
2020-08-29 21:15:54 +10:00
|
|
|
|
if (m_uObj)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
GUILayout.Label("Name: " + m_uObj.name, null);
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
GUILayout.EndHorizontal();
|
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
if (m_uObj)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
|
|
|
|
GUILayout.BeginHorizontal(null);
|
|
|
|
|
GUILayout.Label("<b>Tools:</b>", new GUILayoutOption[] { GUILayout.Width(80) });
|
2020-08-29 21:15:54 +10:00
|
|
|
|
UIHelpers.InstantiateButton(m_uObj);
|
|
|
|
|
if (m_component && m_component.gameObject is GameObject obj)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
|
|
|
|
GUI.skin.label.alignment = TextAnchor.MiddleRight;
|
|
|
|
|
GUILayout.Label("GameObject:", null);
|
|
|
|
|
if (GUILayout.Button("<color=#00FF00>" + obj.name + "</color>", new GUILayoutOption[] { GUILayout.MaxWidth(m_rect.width - 350) }))
|
|
|
|
|
{
|
|
|
|
|
WindowManager.InspectObject(obj, out bool _);
|
|
|
|
|
}
|
|
|
|
|
GUI.skin.label.alignment = TextAnchor.UpperLeft;
|
|
|
|
|
}
|
|
|
|
|
GUILayout.EndHorizontal();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UIStyles.HorizontalLine(Color.grey);
|
|
|
|
|
|
|
|
|
|
GUILayout.BeginHorizontal(null);
|
|
|
|
|
GUILayout.Label("<b>Search:</b>", new GUILayoutOption[] { GUILayout.Width(75) });
|
|
|
|
|
m_search = GUILayout.TextField(m_search, null);
|
2020-08-22 17:17:11 +10:00
|
|
|
|
GUILayout.Label("<b>Limit per page:</b>", new GUILayoutOption[] { GUILayout.Width(125) });
|
|
|
|
|
var limitString = m_limitPerPage.ToString();
|
|
|
|
|
limitString = GUILayout.TextField(limitString, new GUILayoutOption[] { GUILayout.Width(60) });
|
|
|
|
|
if (int.TryParse(limitString, out int i))
|
|
|
|
|
{
|
|
|
|
|
m_limitPerPage = i;
|
|
|
|
|
}
|
2020-08-07 22:19:03 +10:00
|
|
|
|
GUILayout.EndHorizontal();
|
|
|
|
|
|
|
|
|
|
GUILayout.BeginHorizontal(null);
|
|
|
|
|
GUILayout.Label("<b>Filter:</b>", new GUILayoutOption[] { GUILayout.Width(75) });
|
2020-08-29 21:15:54 +10:00
|
|
|
|
FilterToggle(MemberTypes.All, "All");
|
|
|
|
|
FilterToggle(MemberTypes.Property, "Properties");
|
|
|
|
|
FilterToggle(MemberTypes.Field, "Fields");
|
|
|
|
|
FilterToggle(MemberTypes.Method, "Methods");
|
2020-08-07 22:19:03 +10:00
|
|
|
|
GUILayout.EndHorizontal();
|
|
|
|
|
|
|
|
|
|
GUILayout.BeginHorizontal(null);
|
|
|
|
|
GUILayout.Label("<b>Values:</b>", new GUILayoutOption[] { GUILayout.Width(75) });
|
|
|
|
|
if (GUILayout.Button("Update", new GUILayoutOption[] { GUILayout.Width(100) }))
|
|
|
|
|
{
|
|
|
|
|
UpdateValues();
|
|
|
|
|
}
|
|
|
|
|
GUI.color = m_autoUpdate ? Color.green : Color.red;
|
|
|
|
|
m_autoUpdate = GUILayout.Toggle(m_autoUpdate, "Auto-update?", new GUILayoutOption[] { GUILayout.Width(100) });
|
2020-08-22 17:17:11 +10:00
|
|
|
|
GUI.color = m_hideFailedReflection ? Color.green : Color.red;
|
|
|
|
|
m_hideFailedReflection = GUILayout.Toggle(m_hideFailedReflection, "Hide failed Reflection?", new GUILayoutOption[] { GUILayout.Width(150) });
|
2020-08-07 22:19:03 +10:00
|
|
|
|
GUI.color = Color.white;
|
|
|
|
|
GUILayout.EndHorizontal();
|
|
|
|
|
|
|
|
|
|
GUILayout.Space(10);
|
|
|
|
|
|
2020-08-22 00:16:05 +10:00
|
|
|
|
int count = m_cachedMemberFiltered.Length;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
if (count > m_limitPerPage)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-22 00:16:05 +10:00
|
|
|
|
// prev/next page buttons
|
|
|
|
|
GUILayout.BeginHorizontal(null);
|
2020-08-22 17:17:11 +10:00
|
|
|
|
int maxOffset = (int)Mathf.Ceil((float)(count / (decimal)m_limitPerPage)) - 1;
|
2020-08-22 00:16:05 +10:00
|
|
|
|
if (GUILayout.Button("< Prev", null))
|
|
|
|
|
{
|
|
|
|
|
if (m_pageOffset > 0) m_pageOffset--;
|
2020-08-24 01:42:19 +10:00
|
|
|
|
scroll = Vector2.zero;
|
2020-08-22 00:16:05 +10:00
|
|
|
|
}
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
2020-08-22 00:16:05 +10:00
|
|
|
|
GUILayout.Label($"Page {m_pageOffset + 1}/{maxOffset + 1}", new GUILayoutOption[] { GUILayout.Width(80) });
|
|
|
|
|
|
|
|
|
|
if (GUILayout.Button("Next >", null))
|
|
|
|
|
{
|
|
|
|
|
if (m_pageOffset < maxOffset) m_pageOffset++;
|
2020-08-24 01:42:19 +10:00
|
|
|
|
scroll = Vector2.zero;
|
2020-08-22 00:16:05 +10:00
|
|
|
|
}
|
|
|
|
|
GUILayout.EndHorizontal();
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-22 00:16:05 +10:00
|
|
|
|
scroll = GUILayout.BeginScrollView(scroll, GUI.skin.scrollView);
|
|
|
|
|
|
|
|
|
|
GUILayout.Space(10);
|
|
|
|
|
|
|
|
|
|
DrawMembers(this.m_cachedMemberFiltered);
|
|
|
|
|
|
2020-08-07 22:19:03 +10:00
|
|
|
|
GUILayout.EndScrollView();
|
|
|
|
|
|
2020-08-28 00:45:34 +10:00
|
|
|
|
m_rect = ResizeDrag.ResizeWindow(m_rect, windowID);
|
2020-08-07 22:19:03 +10:00
|
|
|
|
|
|
|
|
|
GUILayout.EndArea();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
MelonLogger.LogWarning("Exception on window draw. Message: " + e.Message);
|
|
|
|
|
DestroyWindow();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
private void DrawMembers(CacheObjectBase[] members)
|
2020-08-22 00:16:05 +10:00
|
|
|
|
{
|
|
|
|
|
// todo pre-cache list based on current search, otherwise this doesnt work.
|
|
|
|
|
|
|
|
|
|
int i = 0;
|
2020-08-29 21:15:54 +10:00
|
|
|
|
DrawMembersInternal("Properties", MemberTypes.Property, members, ref i);
|
|
|
|
|
DrawMembersInternal("Fields", MemberTypes.Field, members, ref i);
|
|
|
|
|
DrawMembersInternal("Methods", MemberTypes.Method, members, ref i);
|
2020-08-22 00:16:05 +10:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
private void DrawMembersInternal(string title, MemberTypes filter, CacheObjectBase[] members, ref int index)
|
2020-08-13 18:43:34 +10:00
|
|
|
|
{
|
2020-08-29 21:15:54 +10:00
|
|
|
|
if (m_filter != filter && m_filter != MemberTypes.All)
|
2020-08-22 00:16:05 +10:00
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
UIStyles.HorizontalLine(Color.grey);
|
2020-08-13 18:43:34 +10:00
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
GUILayout.Label($"<size=18><b><color=gold>{title}</color></b></size>", null);
|
2020-08-13 18:43:34 +10:00
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
int offset = (m_pageOffset * m_limitPerPage) + index;
|
2020-08-22 00:16:05 +10:00
|
|
|
|
|
|
|
|
|
if (offset >= m_cachedMemberFiltered.Length)
|
2020-08-13 18:43:34 +10:00
|
|
|
|
{
|
2020-08-22 00:16:05 +10:00
|
|
|
|
m_pageOffset = 0;
|
|
|
|
|
offset = 0;
|
|
|
|
|
}
|
2020-08-13 18:43:34 +10:00
|
|
|
|
|
2020-08-22 17:17:11 +10:00
|
|
|
|
for (int j = offset; j < offset + m_limitPerPage && j < members.Length; j++)
|
2020-08-22 00:16:05 +10:00
|
|
|
|
{
|
|
|
|
|
var holder = members[j];
|
|
|
|
|
|
|
|
|
|
if (holder.MemberInfoType != filter || !ShouldProcessMember(holder)) continue;
|
2020-08-13 18:43:34 +10:00
|
|
|
|
|
2020-08-18 17:11:58 +10:00
|
|
|
|
GUILayout.BeginHorizontal(new GUILayoutOption[] { GUILayout.Height(25) });
|
2020-08-22 00:16:05 +10:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
holder.Draw(this.m_rect, 180f);
|
|
|
|
|
}
|
|
|
|
|
catch // (Exception e)
|
|
|
|
|
{
|
|
|
|
|
//MelonLogger.Log("Exception drawing member " + holder.MemberInfo.Name);
|
|
|
|
|
//MelonLogger.Log(e.GetType() + ", " + e.Message);
|
|
|
|
|
//MelonLogger.Log(e.StackTrace);
|
|
|
|
|
}
|
2020-08-18 17:11:58 +10:00
|
|
|
|
GUILayout.EndHorizontal();
|
2020-08-22 00:16:05 +10:00
|
|
|
|
|
|
|
|
|
index++;
|
2020-08-22 17:17:11 +10:00
|
|
|
|
if (index >= m_limitPerPage) break;
|
2020-08-18 17:11:58 +10:00
|
|
|
|
}
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-29 21:15:54 +10:00
|
|
|
|
private void FilterToggle(MemberTypes mode, string label)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-18 17:11:58 +10:00
|
|
|
|
if (m_filter == mode)
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-18 17:11:58 +10:00
|
|
|
|
GUI.color = Color.green;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
2020-08-18 17:11:58 +10:00
|
|
|
|
else
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-18 17:11:58 +10:00
|
|
|
|
GUI.color = Color.white;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
2020-08-18 17:11:58 +10:00
|
|
|
|
if (GUILayout.Button(label, new GUILayoutOption[] { GUILayout.Width(100) }))
|
2020-08-07 22:19:03 +10:00
|
|
|
|
{
|
2020-08-18 17:11:58 +10:00
|
|
|
|
m_filter = mode;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
2020-08-18 17:11:58 +10:00
|
|
|
|
GUI.color = Color.white;
|
2020-08-07 22:19:03 +10:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|