diff --git a/src/CacheObject/CacheMember.cs b/src/CacheObject/CacheMember.cs
index 1675b2a..e2cbeed 100644
--- a/src/CacheObject/CacheMember.cs
+++ b/src/CacheObject/CacheMember.cs
@@ -123,13 +123,13 @@ namespace Explorer.CacheObject
label = $"[{label} = {this.m_arguments[i].DefaultValue ?? "null"}]";
}
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
GUILayout.Label(i.ToString(), new GUILayoutOption[] { GUILayout.Width(15) });
GUILayout.Label(label, new GUILayoutOption[] { GUILayout.ExpandWidth(false) });
- this.m_argumentInput[i] = GUIUnstrip.TextField(input, new GUILayoutOption[] { GUILayout.ExpandWidth(true) });
+ this.m_argumentInput[i] = GUIHelper.TextField(input, new GUILayoutOption[] { GUILayout.ExpandWidth(true) });
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
diff --git a/src/CacheObject/CacheMethod.cs b/src/CacheObject/CacheMethod.cs
index f115c22..36ecc17 100644
--- a/src/CacheObject/CacheMethod.cs
+++ b/src/CacheObject/CacheMethod.cs
@@ -182,14 +182,14 @@ namespace Explorer.CacheObject
}
var input = this.GenericArgInput[i];
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
GUILayout.Label(
$"{this.GenericArgs[i].Name}",
new GUILayoutOption[] { GUILayout.Width(15) }
);
- this.GenericArgInput[i] = GUIUnstrip.TextField(input, new GUILayoutOption[] { GUILayout.Width(150) });
+ this.GenericArgInput[i] = GUIHelper.TextField(input, new GUILayoutOption[] { GUILayout.Width(150) });
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
GUILayout.Label(types, new GUILayoutOption[0]);
diff --git a/src/Explorer.csproj b/src/Explorer.csproj
index b945f13..42d0b4e 100644
--- a/src/Explorer.csproj
+++ b/src/Explorer.csproj
@@ -262,18 +262,19 @@
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs
index a702835..7e80d10 100644
--- a/src/ExplorerCore.cs
+++ b/src/ExplorerCore.cs
@@ -12,7 +12,7 @@ namespace Explorer
public class ExplorerCore
{
public const string NAME = "Explorer " + VERSION + " (" + PLATFORM + ", " + MODLOADER + ")";
- public const string VERSION = "2.0.6";
+ public const string VERSION = "2.0.7";
public const string AUTHOR = "Sinai";
public const string GUID = "com.sinai.explorer";
diff --git a/src/Helpers/ICallHelper.cs b/src/Helpers/ICallHelper.cs
index a2de5bd..bc89879 100644
--- a/src/Helpers/ICallHelper.cs
+++ b/src/Helpers/ICallHelper.cs
@@ -5,9 +5,11 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Reflection;
+using System.Diagnostics.CodeAnalysis;
namespace Explorer.Helpers
{
+ [SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "External methods")]
public static class ICallHelper
{
private static readonly Dictionary iCallCache = new Dictionary();
@@ -32,14 +34,8 @@ namespace Explorer.Helpers
return (T)iCall;
}
- #region External
- #pragma warning disable IDE1006 // Naming Styles
-
[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr il2cpp_resolve_icall([MarshalAs(UnmanagedType.LPStr)] string name);
-
- #pragma warning restore IDE1006
- #endregion
}
}
#endif
\ No newline at end of file
diff --git a/src/Helpers/ReflectionHelpers.cs b/src/Helpers/ReflectionHelpers.cs
index 3d756c9..d1aca8f 100644
--- a/src/Helpers/ReflectionHelpers.cs
+++ b/src/Helpers/ReflectionHelpers.cs
@@ -5,6 +5,7 @@ using System.IO;
using System.Reflection;
using UnityEngine;
using BF = System.Reflection.BindingFlags;
+using System.Diagnostics.CodeAnalysis;
#if CPP
using ILType = Il2CppSystem.Type;
using UnhollowerBaseLib;
@@ -14,6 +15,7 @@ using System.Runtime.InteropServices;
namespace Explorer.Helpers
{
+ [SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "External methods")]
public class ReflectionHelpers
{
public static BF CommonFlags = BF.Public | BF.Instance | BF.NonPublic | BF.Static;
@@ -51,12 +53,6 @@ namespace Explorer.Helpers
.GetField("NativeClassPtr", BF.Public | BF.Static)
.GetValue(null);
- if (castToPtr == IntPtr.Zero)
- {
- ExplorerCore.LogWarning($"[Il2CppCast] Could not get an IntPtr for castTo '{castTo.FullName}'!");
- //return obj;
- }
-
ClassPointers.Add(castTo, castToPtr);
}
else
@@ -64,16 +60,18 @@ namespace Explorer.Helpers
castToPtr = ClassPointers[castTo];
}
- IntPtr objPtr = ilObj.Pointer;
- var classPtr = il2cpp_object_get_class(objPtr);
+ if (castToPtr == IntPtr.Zero)
+ return obj;
+
+ var classPtr = il2cpp_object_get_class(ilObj.Pointer);
if (!il2cpp_class_is_assignable_from(castToPtr, classPtr))
return obj;
- if (RuntimeSpecificsStore.IsInjected(classPtr))
- return UnhollowerBaseLib.Runtime.ClassInjectorBase.GetMonoObjectFromIl2CppPointer(objPtr);
+ if (RuntimeSpecificsStore.IsInjected(castToPtr))
+ return UnhollowerBaseLib.Runtime.ClassInjectorBase.GetMonoObjectFromIl2CppPointer(ilObj.Pointer);
- return Activator.CreateInstance(castTo, objPtr);
+ return Activator.CreateInstance(castTo, ilObj.Pointer);
}
[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
@@ -81,6 +79,7 @@ namespace Explorer.Helpers
[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
public static extern IntPtr il2cpp_object_get_class(IntPtr obj);
+
#endif
public static Type GetTypeByName(string fullName)
diff --git a/src/Input/InputManager.cs b/src/Input/InputManager.cs
index e2ed087..291a281 100644
--- a/src/Input/InputManager.cs
+++ b/src/Input/InputManager.cs
@@ -3,12 +3,14 @@ using System.Reflection;
using UnityEngine;
using Explorer.Input;
using Explorer.Helpers;
+using System.Diagnostics.CodeAnalysis;
#if CPP
using UnhollowerBaseLib;
#endif
namespace Explorer
{
+ [SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "Unity style")]
public static class InputManager
{
private static IAbstractInput m_inputModule;
@@ -49,7 +51,6 @@ namespace Explorer
#endif
#if CPP
-#pragma warning disable IDE1006
// public extern static string compositionString { get; }
internal delegate IntPtr d_get_compositionString();
@@ -82,8 +83,6 @@ namespace Explorer
iCall.Invoke(ref value);
}
}
-
-#pragma warning restore IDE1006
#endif
}
}
\ No newline at end of file
diff --git a/src/Input/InputSystem.cs b/src/Input/InputSystem.cs
index c0004fc..d653004 100644
--- a/src/Input/InputSystem.cs
+++ b/src/Input/InputSystem.cs
@@ -10,64 +10,64 @@ namespace Explorer.Input
{
public class InputSystem : IAbstractInput
{
- public static Type TKeyboard => _keyboard ?? (_keyboard = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Keyboard"));
- private static Type _keyboard;
+ public static Type TKeyboard => m_tKeyboard ?? (m_tKeyboard = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Keyboard"));
+ private static Type m_tKeyboard;
- public static Type TMouse => _mouse ?? (_mouse = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Mouse"));
- private static Type _mouse;
+ public static Type TMouse => m_tMouse ?? (m_tMouse = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Mouse"));
+ private static Type m_tMouse;
- public static Type TKey => _key ?? (_key = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Key"));
- private static Type _key;
+ public static Type TKey => m_tKey ?? (m_tKey = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Key"));
+ private static Type m_tKey;
- private static PropertyInfo _btnIsPressedProp;
- private static PropertyInfo _btnWasPressedProp;
+ private static PropertyInfo m_btnIsPressedProp;
+ private static PropertyInfo m_btnWasPressedProp;
- private static object CurrentKeyboard => _currentKeyboard ?? (_currentKeyboard = _kbCurrentProp.GetValue(null, null));
- private static object _currentKeyboard;
- private static PropertyInfo _kbCurrentProp;
- private static PropertyInfo _kbIndexer;
+ private static object CurrentKeyboard => m_currentKeyboard ?? (m_currentKeyboard = m_kbCurrentProp.GetValue(null, null));
+ private static object m_currentKeyboard;
+ private static PropertyInfo m_kbCurrentProp;
+ private static PropertyInfo m_kbIndexer;
- private static object CurrentMouse => _currentMouse ?? (_currentMouse = _mouseCurrentProp.GetValue(null, null));
- private static object _currentMouse;
- private static PropertyInfo _mouseCurrentProp;
+ private static object CurrentMouse => m_currentMouse ?? (m_currentMouse = m_mouseCurrentProp.GetValue(null, null));
+ private static object m_currentMouse;
+ private static PropertyInfo m_mouseCurrentProp;
- private static object LeftMouseButton => _lmb ?? (_lmb = _leftButtonProp.GetValue(CurrentMouse, null));
- private static object _lmb;
- private static PropertyInfo _leftButtonProp;
+ private static object LeftMouseButton => m_lmb ?? (m_lmb = m_leftButtonProp.GetValue(CurrentMouse, null));
+ private static object m_lmb;
+ private static PropertyInfo m_leftButtonProp;
- private static object RightMouseButton => _rmb ?? (_rmb = _rightButtonProp.GetValue(CurrentMouse, null));
- private static object _rmb;
- private static PropertyInfo _rightButtonProp;
+ private static object RightMouseButton => m_rmb ?? (m_rmb = m_rightButtonProp.GetValue(CurrentMouse, null));
+ private static object m_rmb;
+ private static PropertyInfo m_rightButtonProp;
- private static object MousePositionInfo => _pos ?? (_pos = _positionProp.GetValue(CurrentMouse, null));
- private static object _pos;
- private static PropertyInfo _positionProp;
- private static MethodInfo _readVector2InputMethod;
+ private static object MousePositionInfo => m_pos ?? (m_pos = m_positionProp.GetValue(CurrentMouse, null));
+ private static object m_pos;
+ private static PropertyInfo m_positionProp;
+ private static MethodInfo m_readVector2InputMethod;
- public Vector2 MousePosition => (Vector2)_readVector2InputMethod.Invoke(MousePositionInfo, new object[0]);
+ public Vector2 MousePosition => (Vector2)m_readVector2InputMethod.Invoke(MousePositionInfo, new object[0]);
public bool GetKeyDown(KeyCode key)
{
var parsedKey = Enum.Parse(TKey, key.ToString());
- var actualKey = _kbIndexer.GetValue(CurrentKeyboard, new object[] { parsedKey });
+ var actualKey = m_kbIndexer.GetValue(CurrentKeyboard, new object[] { parsedKey });
- return (bool)_btnWasPressedProp.GetValue(actualKey, null);
+ return (bool)m_btnWasPressedProp.GetValue(actualKey, null);
}
public bool GetKey(KeyCode key)
{
var parsed = Enum.Parse(TKey, key.ToString());
- var actualKey = _kbIndexer.GetValue(CurrentKeyboard, new object[] { parsed });
+ var actualKey = m_kbIndexer.GetValue(CurrentKeyboard, new object[] { parsed });
- return (bool)_btnIsPressedProp.GetValue(actualKey, null);
+ return (bool)m_btnIsPressedProp.GetValue(actualKey, null);
}
public bool GetMouseButtonDown(int btn)
{
switch (btn)
{
- case 0: return (bool)_btnWasPressedProp.GetValue(LeftMouseButton, null);
- case 1: return (bool)_btnWasPressedProp.GetValue(RightMouseButton, null);
+ case 0: return (bool)m_btnWasPressedProp.GetValue(LeftMouseButton, null);
+ case 1: return (bool)m_btnWasPressedProp.GetValue(RightMouseButton, null);
// case 2: return (bool)_btnWasPressedProp.GetValue(MiddleMouseButton, null);
default: throw new NotImplementedException();
}
@@ -77,8 +77,8 @@ namespace Explorer.Input
{
switch (btn)
{
- case 0: return (bool)_btnIsPressedProp.GetValue(LeftMouseButton, null);
- case 1: return (bool)_btnIsPressedProp.GetValue(RightMouseButton, null);
+ case 0: return (bool)m_btnIsPressedProp.GetValue(LeftMouseButton, null);
+ case 1: return (bool)m_btnIsPressedProp.GetValue(RightMouseButton, null);
// case 2: return (bool)_btnIsPressedProp.GetValue(MiddleMouseButton, null);
default: throw new NotImplementedException();
}
@@ -88,21 +88,21 @@ namespace Explorer.Input
{
ExplorerCore.Log("Initializing new InputSystem support...");
- _kbCurrentProp = TKeyboard.GetProperty("current");
- _kbIndexer = TKeyboard.GetProperty("Item", new Type[] { TKey });
+ m_kbCurrentProp = TKeyboard.GetProperty("current");
+ m_kbIndexer = TKeyboard.GetProperty("Item", new Type[] { TKey });
var btnControl = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Controls.ButtonControl");
- _btnIsPressedProp = btnControl.GetProperty("isPressed");
- _btnWasPressedProp = btnControl.GetProperty("wasPressedThisFrame");
+ m_btnIsPressedProp = btnControl.GetProperty("isPressed");
+ m_btnWasPressedProp = btnControl.GetProperty("wasPressedThisFrame");
- _mouseCurrentProp = TMouse.GetProperty("current");
- _leftButtonProp = TMouse.GetProperty("leftButton");
- _rightButtonProp = TMouse.GetProperty("rightButton");
+ m_mouseCurrentProp = TMouse.GetProperty("current");
+ m_leftButtonProp = TMouse.GetProperty("leftButton");
+ m_rightButtonProp = TMouse.GetProperty("rightButton");
- _positionProp = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Pointer")
+ m_positionProp = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.Pointer")
.GetProperty("position");
- _readVector2InputMethod = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.InputControl`1")
+ m_readVector2InputMethod = ReflectionHelpers.GetTypeByName("UnityEngine.InputSystem.InputControl`1")
.MakeGenericType(typeof(Vector2))
.GetMethod("ReadValue");
}
diff --git a/src/Input/LegacyInput.cs b/src/Input/LegacyInput.cs
index 8b3e996..4188316 100644
--- a/src/Input/LegacyInput.cs
+++ b/src/Input/LegacyInput.cs
@@ -10,34 +10,34 @@ namespace Explorer.Input
{
public class LegacyInput : IAbstractInput
{
- public static Type TInput => _input ?? (_input = ReflectionHelpers.GetTypeByName("UnityEngine.Input"));
- private static Type _input;
+ public static Type TInput => m_tInput ?? (m_tInput = ReflectionHelpers.GetTypeByName("UnityEngine.Input"));
+ private static Type m_tInput;
- private static PropertyInfo _mousePositionProp;
- private static MethodInfo _getKeyMethod;
- private static MethodInfo _getKeyDownMethod;
- private static MethodInfo _getMouseButtonMethod;
- private static MethodInfo _getMouseButtonDownMethod;
+ private static PropertyInfo m_mousePositionProp;
+ private static MethodInfo m_getKeyMethod;
+ private static MethodInfo m_getKeyDownMethod;
+ private static MethodInfo m_getMouseButtonMethod;
+ private static MethodInfo m_getMouseButtonDownMethod;
- public Vector2 MousePosition => (Vector3)_mousePositionProp.GetValue(null, null);
+ public Vector2 MousePosition => (Vector3)m_mousePositionProp.GetValue(null, null);
- public bool GetKey(KeyCode key) => (bool)_getKeyMethod.Invoke(null, new object[] { key });
+ public bool GetKey(KeyCode key) => (bool)m_getKeyMethod.Invoke(null, new object[] { key });
- public bool GetKeyDown(KeyCode key) => (bool)_getKeyDownMethod.Invoke(null, new object[] { key });
+ public bool GetKeyDown(KeyCode key) => (bool)m_getKeyDownMethod.Invoke(null, new object[] { key });
- public bool GetMouseButton(int btn) => (bool)_getMouseButtonMethod.Invoke(null, new object[] { btn });
+ public bool GetMouseButton(int btn) => (bool)m_getMouseButtonMethod.Invoke(null, new object[] { btn });
- public bool GetMouseButtonDown(int btn) => (bool)_getMouseButtonDownMethod.Invoke(null, new object[] { btn });
+ public bool GetMouseButtonDown(int btn) => (bool)m_getMouseButtonDownMethod.Invoke(null, new object[] { btn });
public void Init()
{
ExplorerCore.Log("Initializing Legacy Input support...");
- _mousePositionProp = TInput.GetProperty("mousePosition");
- _getKeyMethod = TInput.GetMethod("GetKey", new Type[] { typeof(KeyCode) });
- _getKeyDownMethod = TInput.GetMethod("GetKeyDown", new Type[] { typeof(KeyCode) });
- _getMouseButtonMethod = TInput.GetMethod("GetMouseButton", new Type[] { typeof(int) });
- _getMouseButtonDownMethod = TInput.GetMethod("GetMouseButtonDown", new Type[] { typeof(int) });
+ m_mousePositionProp = TInput.GetProperty("mousePosition");
+ m_getKeyMethod = TInput.GetMethod("GetKey", new Type[] { typeof(KeyCode) });
+ m_getKeyDownMethod = TInput.GetMethod("GetKeyDown", new Type[] { typeof(KeyCode) });
+ m_getMouseButtonMethod = TInput.GetMethod("GetMouseButton", new Type[] { typeof(int) });
+ m_getMouseButtonDownMethod = TInput.GetMethod("GetMouseButtonDown", new Type[] { typeof(int) });
}
}
}
diff --git a/src/Tests/TestClass.cs b/src/Tests/TestClass.cs
index e5644b4..94f9212 100644
--- a/src/Tests/TestClass.cs
+++ b/src/Tests/TestClass.cs
@@ -8,6 +8,7 @@ using Explorer.UI.Shared;
#if CPP
using UnhollowerBaseLib;
using UnityEngine.SceneManagement;
+using Explorer.Unstrip.ImageConversion;
#endif
namespace Explorer.Tests
@@ -63,6 +64,10 @@ namespace Explorer.Tests
GameObject.DontDestroyOnLoad(TestTexture);
GameObject.DontDestroyOnLoad(TestSprite);
+ //// test loading a tex from file
+ //var dataToLoad = System.IO.File.ReadAllBytes(@"Mods\Explorer\Tex_Nemundis_Nebula.png");
+ //ExplorerCore.Log($"Tex load success: {TestTexture.LoadImage(dataToLoad, false)}");
+
ILHashSetTest = new Il2CppSystem.Collections.Generic.HashSet();
ILHashSetTest.Add("1");
ILHashSetTest.Add("2");
diff --git a/src/UI/Inspectors/GameObjectInspector.cs b/src/UI/Inspectors/GameObjectInspector.cs
index 35f766b..26ddb39 100644
--- a/src/UI/Inspectors/GameObjectInspector.cs
+++ b/src/UI/Inspectors/GameObjectInspector.cs
@@ -224,12 +224,12 @@ namespace Explorer.UI.Inspectors
if (!WindowManager.TabView)
{
Header();
- GUIUnstrip.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
+ GUIHelper.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
}
- scroll = GUIUnstrip.BeginScrollView(scroll);
+ scroll = GUIHelper.BeginScrollView(scroll);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Scene: " + (m_scene == "" ? "n/a" : m_scene) + "", new GUILayoutOption[0]);
if (m_scene == UnityHelpers.ActiveSceneName)
{
@@ -245,7 +245,7 @@ namespace Explorer.UI.Inspectors
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Path:", new GUILayoutOption[] { GUILayout.Width(50) });
string pathlabel = TargetGO.transform.GetGameObjectPath();
if (TargetGO.transform.parent != null)
@@ -255,24 +255,24 @@ namespace Explorer.UI.Inspectors
InspectGameObject(TargetGO.transform.parent);
}
}
- GUIUnstrip.TextArea(pathlabel, new GUILayoutOption[0]);
+ GUIHelper.TextArea(pathlabel, new GUILayoutOption[0]);
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Name:", new GUILayoutOption[] { GUILayout.Width(50) });
- GUIUnstrip.TextArea(m_name, new GUILayoutOption[0]);
+ GUIHelper.TextArea(m_name, new GUILayoutOption[0]);
GUILayout.EndHorizontal();
LayerControls();
// --- Horizontal Columns section ---
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
+ GUIHelper.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
TransformList(rect);
GUILayout.EndVertical();
- GUIUnstrip.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
+ GUIHelper.BeginVertical(new GUILayoutOption[] { GUILayout.Width(rect.width / 2 - 17) });
ComponentList(rect);
GUILayout.EndVertical();
@@ -280,13 +280,13 @@ namespace Explorer.UI.Inspectors
GameObjectControls();
- GUIUnstrip.EndScrollView();
+ GUIHelper.EndScrollView();
if (!WindowManager.TabView)
{
m_rect = ResizeDrag.ResizeWindow(rect, windowID);
- GUIUnstrip.EndArea();
+ GUIHelper.EndArea();
}
}
catch (Exception e)
@@ -297,7 +297,7 @@ namespace Explorer.UI.Inspectors
private void LayerControls()
{
- GUIUnstrip.BeginHorizontal();
+ GUIHelper.BeginHorizontal();
GUILayout.Label("Layer:", new GUILayoutOption[] { GUILayout.Width(50) });
if (GUILayout.Button("<", new GUILayoutOption[] { GUILayout.Width(30) }))
@@ -325,12 +325,12 @@ namespace Explorer.UI.Inspectors
private void TransformList(Rect m_rect)
{
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
- m_transformScroll = GUIUnstrip.BeginScrollView(m_transformScroll);
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
+ m_transformScroll = GUIHelper.BeginScrollView(m_transformScroll);
GUILayout.Label("Children", new GUILayoutOption[0]);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
ChildPages.DrawLimitInputArea();
if (ChildPages.ItemCount > ChildPages.ItemsPerPage)
@@ -338,7 +338,7 @@ namespace Explorer.UI.Inspectors
ChildPages.CurrentPageLabel();
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
{
@@ -373,17 +373,17 @@ namespace Explorer.UI.Inspectors
GUILayout.Label("None", new GUILayoutOption[0]);
}
- GUIUnstrip.EndScrollView();
+ GUIHelper.EndScrollView();
GUILayout.EndVertical();
}
private void ComponentList(Rect m_rect)
{
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
- m_compScroll = GUIUnstrip.BeginScrollView(m_compScroll);
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
+ m_compScroll = GUIHelper.BeginScrollView(m_compScroll);
GUILayout.Label("Components", new GUILayoutOption[0]);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
CompPages.DrawLimitInputArea();
if (CompPages.ItemCount > CompPages.ItemsPerPage)
@@ -391,7 +391,7 @@ namespace Explorer.UI.Inspectors
CompPages.CurrentPageLabel();
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
if (GUILayout.Button("< Prev", new GUILayoutOption[] { GUILayout.Width(80) }))
{
@@ -404,9 +404,9 @@ namespace Explorer.UI.Inspectors
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
var width = m_rect.width / 2 - 135f;
- m_addComponentInput = GUIUnstrip.TextField(m_addComponentInput, new GUILayoutOption[] { GUILayout.Width(width) });
+ m_addComponentInput = GUIHelper.TextField(m_addComponentInput, new GUILayoutOption[] { GUILayout.Width(width) });
if (GUILayout.Button("Add Comp", new GUILayoutOption[0]))
{
if (ReflectionHelpers.GetTypeByName(m_addComponentInput) is Type compType)
@@ -453,7 +453,7 @@ namespace Explorer.UI.Inspectors
#else
component.GetType();
#endif
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
if (ReflectionHelpers.BehaviourType.IsAssignableFrom(type))
{
#if CPP
@@ -464,7 +464,7 @@ namespace Explorer.UI.Inspectors
}
else
{
- GUIUnstrip.Space(26);
+ GUIHelper.Space(26);
}
if (GUILayout.Button("" + type.Name + "", new GUILayoutOption[] { GUILayout.Width(m_rect.width / 2 - 100) }))
{
@@ -488,7 +488,7 @@ namespace Explorer.UI.Inspectors
}
}
- GUIUnstrip.EndScrollView();
+ GUIHelper.EndScrollView();
GUILayout.EndVertical();
}
@@ -520,7 +520,7 @@ namespace Explorer.UI.Inspectors
{
if (m_hideControls)
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("GameObject Controls", new GUILayoutOption[] { GUILayout.Width(200) });
if (GUILayout.Button("^ Show ^", new GUILayoutOption[] { GUILayout.Width(75) }))
{
@@ -531,9 +531,9 @@ namespace Explorer.UI.Inspectors
return;
}
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[] { GUILayout.Width(520) });
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[] { GUILayout.Width(520) });
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("GameObject Controls", new GUILayoutOption[] { GUILayout.Width(200) });
if (GUILayout.Button("v Hide v", new GUILayoutOption[] { GUILayout.Width(75) }))
{
@@ -541,7 +541,7 @@ namespace Explorer.UI.Inspectors
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
bool m_active = TargetGO.activeSelf;
m_active = GUILayout.Toggle(m_active, (m_active ? "Enabled " : "Disabled") + "",
new GUILayoutOption[] { GUILayout.Width(80) });
@@ -566,9 +566,9 @@ namespace Explorer.UI.Inspectors
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
- m_setParentInput = GUIUnstrip.TextField(m_setParentInput, new GUILayoutOption[0]);
+ m_setParentInput = GUIHelper.TextField(m_setParentInput, new GUILayoutOption[0]);
if (GUILayout.Button("Set Parent", new GUILayoutOption[] { GUILayout.Width(80) }))
{
if (GameObject.Find(m_setParentInput) is GameObject newparent)
@@ -587,13 +587,13 @@ namespace Explorer.UI.Inspectors
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
m_cachedInput[0] = TranslateControl(TranslateType.Position, ref m_translateAmount, false);
m_cachedInput[1] = TranslateControl(TranslateType.Rotation, ref m_rotateAmount, true);
m_cachedInput[2] = TranslateControl(TranslateType.Scale, ref m_scaleAmount, false);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
if (GUILayout.Button("Apply to Transform", new GUILayoutOption[0]) || m_autoApplyTransform)
{
if (m_localContext)
@@ -619,7 +619,7 @@ namespace Explorer.UI.Inspectors
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
BoolToggle(ref m_autoApplyTransform, "Auto-apply to Transform?");
BoolToggle(ref m_autoUpdateTransform, "Auto-update from transform?");
GUILayout.EndHorizontal();
@@ -681,7 +681,7 @@ namespace Explorer.UI.Inspectors
private Vector3 TranslateControl(TranslateType mode, ref float amount, bool multByTime)
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"{(m_localContext ? "Local " : "")}{mode}:",
new GUILayoutOption[] { GUILayout.Width(m_localContext ? 110 : 65) });
@@ -704,7 +704,7 @@ namespace Explorer.UI.Inspectors
Vector3 input = m_cachedInput[(int)mode];
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUI.skin.label.alignment = TextAnchor.MiddleRight;
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(20) });
@@ -718,7 +718,7 @@ namespace Explorer.UI.Inspectors
GUILayout.Label("+/-:", new GUILayoutOption[] { GUILayout.Width(30) });
var amountInput = amount.ToString("F3");
- amountInput = GUIUnstrip.TextField(amountInput, new GUILayoutOption[] { GUILayout.Width(60) });
+ amountInput = GUIHelper.TextField(amountInput, new GUILayoutOption[] { GUILayout.Width(60) });
if (float.TryParse(amountInput, out float f))
{
amount = f;
@@ -733,16 +733,16 @@ namespace Explorer.UI.Inspectors
private void PlusMinusFloat(ref float f, float amount, bool multByTime)
{
string s = f.ToString("F3");
- s = GUIUnstrip.TextField(s, new GUILayoutOption[] { GUILayout.Width(60) });
+ s = GUIHelper.TextField(s, new GUILayoutOption[] { GUILayout.Width(60) });
if (float.TryParse(s, out float f2))
{
f = f2;
}
- if (GUIUnstrip.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
+ if (GUIHelper.RepeatButton("-", new GUILayoutOption[] { GUILayout.Width(20) }))
{
f -= multByTime ? amount * Time.deltaTime : amount;
}
- if (GUIUnstrip.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
+ if (GUIHelper.RepeatButton("+", new GUILayoutOption[] { GUILayout.Width(20) }))
{
f += multByTime ? amount * Time.deltaTime : amount;
}
diff --git a/src/UI/Inspectors/Reflection/InstanceInspector.cs b/src/UI/Inspectors/Reflection/InstanceInspector.cs
index 013f823..281974e 100644
--- a/src/UI/Inspectors/Reflection/InstanceInspector.cs
+++ b/src/UI/Inspectors/Reflection/InstanceInspector.cs
@@ -80,7 +80,7 @@ namespace Explorer.UI.Inspectors
if (m_uObj)
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Tools:", new GUILayoutOption[] { GUILayout.Width(80) });
Buttons.InstantiateButton(m_uObj);
if (m_component && m_component.gameObject is GameObject obj)
diff --git a/src/UI/Inspectors/ReflectionInspector.cs b/src/UI/Inspectors/ReflectionInspector.cs
index bcebc65..ff094ea 100644
--- a/src/UI/Inspectors/ReflectionInspector.cs
+++ b/src/UI/Inspectors/ReflectionInspector.cs
@@ -254,12 +254,12 @@ namespace Explorer.UI.Inspectors
if (!WindowManager.TabView)
{
Header();
- GUIUnstrip.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
+ GUIHelper.BeginArea(new Rect(5, 25, rect.width - 10, rect.height - 35), GUI.skin.box);
}
var asInstance = this as InstanceInspector;
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
var labelWidth = (asInstance != null && asInstance.m_uObj)
? new GUILayoutOption[] { GUILayout.Width(245f) }
: new GUILayoutOption[0];
@@ -273,12 +273,12 @@ namespace Explorer.UI.Inspectors
UIStyles.HorizontalLine(Color.grey);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Search:", new GUILayoutOption[] { GUILayout.Width(75) });
- m_search = GUIUnstrip.TextField(m_search, new GUILayoutOption[0]);
+ m_search = GUIHelper.TextField(m_search, new GUILayoutOption[0]);
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Filter:", new GUILayoutOption[] { GUILayout.Width(75) });
FilterTypeToggle(MemberTypes.All, "All");
FilterTypeToggle(MemberTypes.Property, "Properties");
@@ -288,7 +288,7 @@ namespace Explorer.UI.Inspectors
if (this is InstanceInspector)
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Scope:", new GUILayoutOption[] { GUILayout.Width(75) });
FilterScopeToggle(MemberScopes.Both, "Both");
FilterScopeToggle(MemberScopes.Instance, "Instance");
@@ -296,7 +296,7 @@ namespace Explorer.UI.Inspectors
GUILayout.EndHorizontal();
}
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Values:", new GUILayoutOption[] { GUILayout.Width(75) });
if (GUILayout.Button("Update", new GUILayoutOption[] { GUILayout.Width(100) }))
{
@@ -309,12 +309,12 @@ namespace Explorer.UI.Inspectors
GUI.color = Color.white;
GUILayout.EndHorizontal();
- GUIUnstrip.Space(10);
+ GUIHelper.Space(10);
Pages.ItemCount = m_cachedMembersFiltered.Length;
// prev/next page buttons
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
Pages.DrawLimitInputArea();
@@ -336,13 +336,13 @@ namespace Explorer.UI.Inspectors
// ====== BODY ======
- scroll = GUIUnstrip.BeginScrollView(scroll);
+ scroll = GUIHelper.BeginScrollView(scroll);
- GUIUnstrip.Space(10);
+ GUIHelper.Space(10);
UIStyles.HorizontalLine(Color.grey);
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
var members = this.m_cachedMembersFiltered;
int start = Pages.CalculateOffsetIndex();
@@ -351,7 +351,7 @@ namespace Explorer.UI.Inspectors
{
var holder = members[j];
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[] { GUILayout.Height(25) });
+ GUIHelper.BeginHorizontal(new GUILayoutOption[] { GUILayout.Height(25) });
try
{
holder.Draw(rect, 180f);
@@ -369,13 +369,13 @@ namespace Explorer.UI.Inspectors
}
GUILayout.EndVertical();
- GUIUnstrip.EndScrollView();
+ GUIHelper.EndScrollView();
if (!WindowManager.TabView)
{
m_rect = ResizeDrag.ResizeWindow(rect, windowID);
- GUIUnstrip.EndArea();
+ GUIHelper.EndArea();
}
}
catch (Exception e) when (e.Message.Contains("in a group with only"))
diff --git a/src/UI/InteractiveValue/InteractiveValue.cs b/src/UI/InteractiveValue/InteractiveValue.cs
index 8247150..ec358dd 100644
--- a/src/UI/InteractiveValue/InteractiveValue.cs
+++ b/src/UI/InteractiveValue/InteractiveValue.cs
@@ -71,14 +71,14 @@ namespace Explorer.UI
}
else
{
- GUIUnstrip.Space(labelWidth);
+ GUIHelper.Space(labelWidth);
}
var cacheMethod = OwnerCacheObject as CacheMethod;
if (cacheMember != null && cacheMember.HasParameters)
{
- GUIUnstrip.BeginVertical(new GUILayoutOption[] { GUILayout.ExpandHeight(true) } );
+ GUIHelper.BeginVertical(new GUILayoutOption[] { GUILayout.ExpandHeight(true) } );
if (cacheMember.m_isEvaluating)
{
@@ -92,7 +92,7 @@ namespace Explorer.UI
cacheMember.DrawArgsInput();
}
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
if (GUILayout.Button(EVALUATE_LABEL, new GUILayoutOption[] { GUILayout.Width(70) }))
{
if (cacheMethod != null)
@@ -122,8 +122,8 @@ namespace Explorer.UI
GUILayout.EndVertical();
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(labelWidth);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(labelWidth);
}
else if (cacheMethod != null)
{
@@ -133,8 +133,8 @@ namespace Explorer.UI
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(labelWidth);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(labelWidth);
}
string typeName = $"{ValueType.FullName}";
diff --git a/src/UI/InteractiveValue/Object/InteractiveDictionary.cs b/src/UI/InteractiveValue/Object/InteractiveDictionary.cs
index 233df5d..5a9b68b 100644
--- a/src/UI/InteractiveValue/Object/InteractiveDictionary.cs
+++ b/src/UI/InteractiveValue/Object/InteractiveDictionary.cs
@@ -237,7 +237,7 @@ namespace Explorer.UI
}
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
- GUIUnstrip.Space(5);
+ GUIHelper.Space(5);
if (IsExpanded)
{
@@ -246,9 +246,9 @@ namespace Explorer.UI
if (count > Pages.ItemsPerPage)
{
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.Space(whitespace);
Pages.CurrentPageLabel();
@@ -264,7 +264,7 @@ namespace Explorer.UI
Pages.DrawLimitInputArea();
- GUIUnstrip.Space(5);
+ GUIHelper.Space(5);
}
int offset = Pages.CalculateOffsetIndex();
@@ -276,7 +276,7 @@ namespace Explorer.UI
//collapsing the BeginHorizontal called from ReflectionWindow.WindowFunction or previous array entry
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
//GUIUnstrip.Space(whitespace);
diff --git a/src/UI/InteractiveValue/Object/InteractiveEnumerable.cs b/src/UI/InteractiveValue/Object/InteractiveEnumerable.cs
index a1d97c4..ef51379 100644
--- a/src/UI/InteractiveValue/Object/InteractiveEnumerable.cs
+++ b/src/UI/InteractiveValue/Object/InteractiveEnumerable.cs
@@ -298,7 +298,7 @@ namespace Explorer.UI
}
GUI.skin.button.alignment = TextAnchor.MiddleCenter;
- GUIUnstrip.Space(5);
+ GUIHelper.Space(5);
if (IsExpanded)
{
@@ -307,9 +307,9 @@ namespace Explorer.UI
if (count > Pages.ItemsPerPage)
{
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.Space(whitespace);
Pages.CurrentPageLabel();
@@ -325,7 +325,7 @@ namespace Explorer.UI
Pages.DrawLimitInputArea();
- GUIUnstrip.Space(5);
+ GUIHelper.Space(5);
}
int offset = Pages.CalculateOffsetIndex();
@@ -336,9 +336,9 @@ namespace Explorer.UI
//collapsing the BeginHorizontal called from ReflectionWindow.WindowFunction or previous array entry
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.Space(whitespace);
if (entry == null || entry.IValue == null)
{
diff --git a/src/UI/InteractiveValue/Object/InteractiveTexture2D.cs b/src/UI/InteractiveValue/Object/InteractiveTexture2D.cs
index 60e83e0..b6e0eb3 100644
--- a/src/UI/InteractiveValue/Object/InteractiveTexture2D.cs
+++ b/src/UI/InteractiveValue/Object/InteractiveTexture2D.cs
@@ -57,9 +57,9 @@ namespace Explorer.UI
public override void DrawValue(Rect window, float width)
{
- GUIUnstrip.BeginVertical();
+ GUIHelper.BeginVertical();
- GUIUnstrip.BeginHorizontal();
+ GUIHelper.BeginHorizontal();
if (currentTex && !IsExpanded)
{
@@ -105,11 +105,11 @@ namespace Explorer.UI
private void DrawTextureControls()
{
- GUIUnstrip.BeginHorizontal();
+ GUIHelper.BeginHorizontal();
GUILayout.Label("Save folder:", new GUILayoutOption[] { GUILayout.Width(80f) });
- saveFolder = GUIUnstrip.TextField(saveFolder, new GUILayoutOption[0]);
- GUIUnstrip.Space(10f);
+ saveFolder = GUIHelper.TextField(saveFolder, new GUILayoutOption[0]);
+ GUIHelper.Space(10f);
GUILayout.EndHorizontal();
diff --git a/src/UI/InteractiveValue/Struct/InteractiveColor.cs b/src/UI/InteractiveValue/Struct/InteractiveColor.cs
index 5de25b1..1c21a5c 100644
--- a/src/UI/InteractiveValue/Struct/InteractiveColor.cs
+++ b/src/UI/InteractiveValue/Struct/InteractiveColor.cs
@@ -63,40 +63,40 @@ namespace Explorer.UI
var whitespace = CalcWhitespace(window);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("R:", new GUILayoutOption[] { GUILayout.Width(30) });
- r = GUIUnstrip.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
+ r = GUIHelper.TextField(r, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("G:", new GUILayoutOption[] { GUILayout.Width(30) });
- g = GUIUnstrip.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
+ g = GUIHelper.TextField(g, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("B:", new GUILayoutOption[] { GUILayout.Width(30) });
- b = GUIUnstrip.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
+ b = GUIHelper.TextField(b, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("A:", new GUILayoutOption[] { GUILayout.Width(30) });
- a = GUIUnstrip.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
+ a = GUIHelper.TextField(a, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
// draw set value button
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
if (GUILayout.Button("Apply", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
}
}
diff --git a/src/UI/InteractiveValue/Struct/InteractiveFlags.cs b/src/UI/InteractiveValue/Struct/InteractiveFlags.cs
index e6a1141..00d76b8 100644
--- a/src/UI/InteractiveValue/Struct/InteractiveFlags.cs
+++ b/src/UI/InteractiveValue/Struct/InteractiveFlags.cs
@@ -75,23 +75,23 @@ namespace Explorer.UI
for (int i = 0; i < EnumNames.Length; i++)
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
m_enabledFlags[i] = GUILayout.Toggle(m_enabledFlags[i], EnumNames[i], new GUILayoutOption[0]);
GUILayout.EndHorizontal();
}
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
if (GUILayout.Button("Apply", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetFlagsFromInput();
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
}
}
diff --git a/src/UI/InteractiveValue/Struct/InteractivePrimitive.cs b/src/UI/InteractiveValue/Struct/InteractivePrimitive.cs
index c21bceb..9503a58 100644
--- a/src/UI/InteractiveValue/Struct/InteractivePrimitive.cs
+++ b/src/UI/InteractiveValue/Struct/InteractivePrimitive.cs
@@ -98,13 +98,13 @@ namespace Explorer.UI
// all other non-bool values use TextField
- GUIUnstrip.BeginVertical(new GUILayoutOption[0]);
+ GUIHelper.BeginVertical(new GUILayoutOption[0]);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("" + ValueType.Name + "", new GUILayoutOption[] { GUILayout.Width(50) });
- m_valueToString = GUIUnstrip.TextArea(m_valueToString, new GUILayoutOption[] { GUILayout.ExpandWidth(true) });
+ m_valueToString = GUIHelper.TextArea(m_valueToString, new GUILayoutOption[] { GUILayout.ExpandWidth(true) });
DrawApplyButton();
@@ -113,7 +113,7 @@ namespace Explorer.UI
m_inBitwiseMode = GUILayout.Toggle(m_inBitwiseMode, "Bitwise?", new GUILayoutOption[0]);
}
- GUIUnstrip.Space(10);
+ GUIHelper.Space(10);
GUILayout.EndHorizontal();
@@ -147,7 +147,7 @@ namespace Explorer.UI
{
if (OwnerCacheObject.CanWrite)
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUI.skin.label.alignment = TextAnchor.MiddleRight;
GUILayout.Label("RHS:", new GUILayoutOption[] { GUILayout.Width(35) });
@@ -203,14 +203,14 @@ namespace Explorer.UI
}
}
- m_bitwiseOperatorInput = GUIUnstrip.TextField(m_bitwiseOperatorInput, new GUILayoutOption[] { GUILayout.Width(55) });
+ m_bitwiseOperatorInput = GUIHelper.TextField(m_bitwiseOperatorInput, new GUILayoutOption[] { GUILayout.Width(55) });
GUILayout.EndHorizontal();
}
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"Binary:", new GUILayoutOption[] { GUILayout.Width(60) });
- m_binaryInput = GUIUnstrip.TextField(m_binaryInput, new GUILayoutOption[0]);
+ m_binaryInput = GUIHelper.TextField(m_binaryInput, new GUILayoutOption[0]);
if (OwnerCacheObject.CanWrite)
{
if (GUILayout.Button("Apply", new GUILayoutOption[0]))
diff --git a/src/UI/InteractiveValue/Struct/InteractiveQuaternion.cs b/src/UI/InteractiveValue/Struct/InteractiveQuaternion.cs
index cd00cc0..10a5a96 100644
--- a/src/UI/InteractiveValue/Struct/InteractiveQuaternion.cs
+++ b/src/UI/InteractiveValue/Struct/InteractiveQuaternion.cs
@@ -58,34 +58,34 @@ namespace Explorer.UI
var whitespace = CalcWhitespace(window);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
- x = GUIUnstrip.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
+ x = GUIHelper.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
- y = GUIUnstrip.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
+ y = GUIHelper.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
- z = GUIUnstrip.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
+ z = GUIHelper.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
// draw set value button
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
if (GUILayout.Button("Apply", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
}
}
diff --git a/src/UI/InteractiveValue/Struct/InteractiveRect.cs b/src/UI/InteractiveValue/Struct/InteractiveRect.cs
index 5814f52..ba5e65f 100644
--- a/src/UI/InteractiveValue/Struct/InteractiveRect.cs
+++ b/src/UI/InteractiveValue/Struct/InteractiveRect.cs
@@ -60,40 +60,40 @@ namespace Explorer.UI
var whitespace = CalcWhitespace(window);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
- x = GUIUnstrip.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
+ x = GUIHelper.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
- y = GUIUnstrip.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
+ y = GUIHelper.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
- w = GUIUnstrip.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
+ w = GUIHelper.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("H:", new GUILayoutOption[] { GUILayout.Width(30) });
- h = GUIUnstrip.TextField(h, new GUILayoutOption[] { GUILayout.Width(120) });
+ h = GUIHelper.TextField(h, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
// draw set value button
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
if (GUILayout.Button("Apply", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
}
}
diff --git a/src/UI/InteractiveValue/Struct/InteractiveVector.cs b/src/UI/InteractiveValue/Struct/InteractiveVector.cs
index 5306610..872f12e 100644
--- a/src/UI/InteractiveValue/Struct/InteractiveVector.cs
+++ b/src/UI/InteractiveValue/Struct/InteractiveVector.cs
@@ -100,47 +100,47 @@ namespace Explorer.UI
var whitespace = CalcWhitespace(window);
// always draw x and y
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("X:", new GUILayoutOption[] { GUILayout.Width(30) });
- x = GUIUnstrip.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
+ x = GUIHelper.TextField(x, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("Y:", new GUILayoutOption[] { GUILayout.Width(30) });
- y = GUIUnstrip.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
+ y = GUIHelper.TextField(y, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
if (VectorSize > 2)
{
// draw z
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("Z:", new GUILayoutOption[] { GUILayout.Width(30) });
- z = GUIUnstrip.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
+ z = GUIHelper.TextField(z, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
}
if (VectorSize > 3)
{
// draw w
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
GUILayout.Label("W:", new GUILayoutOption[] { GUILayout.Width(30) });
- w = GUIUnstrip.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
+ w = GUIHelper.TextField(w, new GUILayoutOption[] { GUILayout.Width(120) });
GUILayout.EndHorizontal();
}
// draw set value button
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
- GUIUnstrip.Space(whitespace);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.Space(whitespace);
if (GUILayout.Button("Apply", new GUILayoutOption[] { GUILayout.Width(155) }))
{
SetValueFromInput();
}
GUILayout.EndHorizontal();
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
}
}
diff --git a/src/UI/Main/ConsolePage.cs b/src/UI/Main/ConsolePage.cs
index 3777c05..445b566 100644
--- a/src/UI/Main/ConsolePage.cs
+++ b/src/UI/Main/ConsolePage.cs
@@ -8,6 +8,8 @@ using System.Reflection;
using System.IO;
#if CPP
using UnhollowerRuntimeLib;
+using TextEditor = Explorer.Unstrip.IMGUI.TextEditorUnstrip;
+using Explorer.Unstrip.IMGUI;
#endif
namespace Explorer.UI.Main
@@ -140,15 +142,15 @@ Help();";
GUILayout.Label("Enter code here as though it is a method body:", new GUILayoutOption[0]);
- inputAreaScroll = GUIUnstrip.BeginScrollView(
+ inputAreaScroll = GUIHelper.BeginScrollView(
inputAreaScroll,
- new GUILayoutOption[] { GUILayout.Height(250), GUILayout.ExpandHeight(true) }
+ new GUILayoutOption[] { GUILayout.Height(250), GUIHelper.ExpandHeight(true) }
);
GUI.SetNextControlName(INPUT_CONTROL_NAME);
- m_input = GUIUnstrip.TextArea(m_input, new GUILayoutOption[] { GUILayout.ExpandHeight(true) });
+ m_input = GUIHelper.TextArea(m_input, new GUILayoutOption[] { GUIHelper.ExpandHeight(true) });
- GUIUnstrip.EndScrollView();
+ GUIHelper.EndScrollView();
// EXECUTE BUTTON
@@ -179,7 +181,7 @@ Help();";
// SUGGESTIONS
if (AutoCompletes.Count > 0)
{
- autocompleteScroll = GUIUnstrip.BeginScrollView(autocompleteScroll, new GUILayoutOption[] { GUILayout.Height(150) });
+ autocompleteScroll = GUIHelper.BeginScrollView(autocompleteScroll, new GUILayoutOption[] { GUILayout.Height(150) });
var origSkin = GUI.skin.button;
GUI.skin.button = AutocompleteStyle;
@@ -196,7 +198,7 @@ Help();";
GUI.skin.button = origSkin;
- GUIUnstrip.EndScrollView();
+ GUIHelper.EndScrollView();
}
if (shouldRefocus)
@@ -209,9 +211,9 @@ Help();";
GUILayout.Label("Using directives:", new GUILayoutOption[0]);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label("Add namespace:", new GUILayoutOption[] { GUILayout.Width(105) });
- m_usingInput = GUIUnstrip.TextField(m_usingInput, new GUILayoutOption[] { GUILayout.Width(150) });
+ m_usingInput = GUIHelper.TextField(m_usingInput, new GUILayoutOption[] { GUILayout.Width(150) });
if (GUILayout.Button("Add", new GUILayoutOption[] { GUILayout.Width(120) }))
{
AddUsing(m_usingInput);
@@ -245,7 +247,8 @@ Help();";
#endif
#if CPP
- textEditor = GUIUtility.GetStateObject(Il2CppType.Of(), GUIUtility.keyboardControl).TryCast();
+ //textEditor = GUIUtility.GetStateObject(Il2CppType.Of(), GUIUtility.keyboardControl).TryCast();
+ textEditor = (TextEditor)GUIUtilityUnstrip.GetMonoStateObject(typeof(TextEditor), GUIUtility.keyboardControl);
#else
textEditor = (TextEditor)GUIUtility.GetStateObject(typeof(TextEditor), GUIUtility.keyboardControl);
#endif
@@ -346,9 +349,9 @@ Help();";
{
var style = new GUIStyle
{
- border = new RectOffset(0, 0, 0, 0),
- margin = new RectOffset(0, 0, 0, 0),
- padding = new RectOffset(0, 0, 0, 0),
+ border = new RectOffset(),
+ margin = new RectOffset(),
+ padding = new RectOffset(),
hover = { background = Texture2D.whiteTexture, textColor = Color.black },
normal = { background = null },
focused = { background = Texture2D.whiteTexture, textColor = Color.black },
diff --git a/src/UI/Main/OptionsPage.cs b/src/UI/Main/OptionsPage.cs
index 5453eee..d3c2572 100644
--- a/src/UI/Main/OptionsPage.cs
+++ b/src/UI/Main/OptionsPage.cs
@@ -56,44 +56,44 @@ namespace Explorer.UI.Main
GUILayout.Label("Options", new GUILayoutOption[0]);
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"Menu Toggle Key:", new GUILayoutOption[] { GUILayout.Width(215f) });
toggleKeyInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
GUILayout.EndHorizontal();
UIStyles.HorizontalLine(Color.black, true);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"Default Window Size:", new GUILayoutOption[] { GUILayout.Width(215f) });
defaultSizeInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
GUILayout.EndHorizontal();
UIStyles.HorizontalLine(Color.black, true);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"Default Items per Page:", new GUILayoutOption[] { GUILayout.Width(215f) });
defaultPageLimitInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
GUILayout.EndHorizontal();
UIStyles.HorizontalLine(Color.black, true);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"Enable Bitwise Editing:", new GUILayoutOption[] { GUILayout.Width(215f) });
bitwiseSupportInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
GUILayout.EndHorizontal();
UIStyles.HorizontalLine(Color.black, true);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"Enable Tab View:", new GUILayoutOption[] { GUILayout.Width(215f) });
tabViewInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
GUILayout.EndHorizontal();
UIStyles.HorizontalLine(Color.black, true);
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.Label($"Default Output Path:", new GUILayoutOption[] { GUILayout.Width(215f) });
defaultOutputPathInput.IValue.DrawValue(MainMenu.MainRect, MainMenu.MainRect.width - 215f);
GUILayout.EndHorizontal();
@@ -105,13 +105,13 @@ namespace Explorer.UI.Main
GUILayout.EndVertical();
- GUIUnstrip.Space(10f);
+ GUIHelper.Space(10f);
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
GUILayout.Label("Other", new GUILayoutOption[0]);
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, new GUILayoutOption[0]);
if (GUILayout.Button("Inspect Test Class", new GUILayoutOption[0]))
{
diff --git a/src/UI/Main/ScenePage.cs b/src/UI/Main/ScenePage.cs
index 52e0efc..870387d 100644
--- a/src/UI/Main/ScenePage.cs
+++ b/src/UI/Main/ScenePage.cs
@@ -6,6 +6,7 @@ using UnityEngine.SceneManagement;
using Explorer.UI.Shared;
using Explorer.CacheObject;
using Explorer.Helpers;
+using Explorer.Unstrip.Resources;
namespace Explorer.UI.Main
{
@@ -80,7 +81,7 @@ namespace Explorer.UI.Main
{
var matches = new List();
- foreach (var obj in Resources.FindObjectsOfTypeAll(ReflectionHelpers.GameObjectType))
+ foreach (var obj in ResourcesUnstrip.FindObjectsOfTypeAll(ReflectionHelpers.GameObjectType))
{
#if CPP
var go = obj.TryCast();
@@ -164,7 +165,7 @@ namespace Explorer.UI.Main
{
DrawHeaderArea();
- GUIUnstrip.BeginVertical(GUIContent.none, GUI.skin.box, null);
+ GUIHelper.BeginVertical(GUIContent.none, GUI.skin.box, null);
DrawPageButtons();
@@ -190,7 +191,7 @@ namespace Explorer.UI.Main
private void DrawHeaderArea()
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
// Current Scene label
GUILayout.Label("Current Scene:", new GUILayoutOption[] { GUILayout.Width(120) });
@@ -200,10 +201,10 @@ namespace Explorer.UI.Main
GUILayout.EndHorizontal();
// ----- GameObject Search -----
- GUIUnstrip.BeginHorizontal(GUIContent.none, GUI.skin.box, null);
+ GUIHelper.BeginHorizontal(GUIContent.none, GUI.skin.box, null);
GUILayout.Label("Search Scene:", new GUILayoutOption[] { GUILayout.Width(100) });
- m_searchInput = GUIUnstrip.TextField(m_searchInput, new GUILayoutOption[0]);
+ m_searchInput = GUIHelper.TextField(m_searchInput, new GUILayoutOption[0]);
if (GUILayout.Button("Search", new GUILayoutOption[] { GUILayout.Width(80) }))
{
@@ -211,7 +212,7 @@ namespace Explorer.UI.Main
}
GUILayout.EndHorizontal();
- GUIUnstrip.Space(5);
+ GUIHelper.Space(5);
}
private void SceneChangeButtons()
@@ -252,7 +253,7 @@ namespace Explorer.UI.Main
private void DrawPageButtons()
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
Pages.DrawLimitInputArea();
@@ -283,7 +284,7 @@ namespace Explorer.UI.Main
{
if (m_currentTransform != null)
{
- GUIUnstrip.BeginHorizontal(new GUILayoutOption[0]);
+ GUIHelper.BeginHorizontal(new GUILayoutOption[0]);
if (GUILayout.Button("<-", new GUILayoutOption[] { GUILayout.Width(35) }))
{
TraverseUp();
diff --git a/src/UI/Main/SearchPage.cs b/src/UI/Main/SearchPage.cs
index bfa91bd..61bf967 100644
--- a/src/UI/Main/SearchPage.cs
+++ b/src/UI/Main/SearchPage.cs
@@ -7,6 +7,7 @@ using UnityEngine;
using Explorer.UI.Shared;
using Explorer.CacheObject;
using Explorer.Helpers;
+using Explorer.Unstrip.Resources;
namespace Explorer.UI.Main
{
@@ -163,7 +164,7 @@ namespace Explorer.UI.Main
var matches = new List