1.4.5 (pre-release)

* Pre-release. Will be released once MelonLoader bumps to Unhollower 0.4.9.0
* Added global "Force Unlock Mouse" option, should work on almost all games. Has smart behaviour and will maintain the previous value (or the value which should be set).
* Improve performacne of CacheList casting List ->IEnumerable
* Fix a bug causing some Components to not show the GameObject button in the Reflection Window (top-right corner).
* Fix a bug making the Window Manager think that two of the same Il2Cpp Object are not ReferenceEquals.
* Added logging when C# Console fails to compile anything
* Improve display of Reflection Window member name label, now expands with window resize.
This commit is contained in:
sinaioutlander
2020-08-27 18:05:55 +10:00
parent e567c16221
commit 535e88be9a
10 changed files with 222 additions and 67 deletions

View File

@ -5,7 +5,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using MelonLoader;
using Mono.CSharp;
using UnhollowerBaseLib;
using UnityEngine;
@ -190,7 +189,9 @@ namespace Explorer
UIHelpers.InstantiateButton((UnityEngine.Object)Target);
if (Target is Component comp && comp.gameObject is GameObject obj)
var comp = (Target as Il2CppSystem.Object).TryCast<Component>();
if (comp && comp.gameObject is GameObject obj)
{
GUI.skin.label.alignment = TextAnchor.MiddleRight;
GUILayout.Label("GameObject:", null);

View File

@ -102,12 +102,24 @@ namespace Explorer
{
createdNew = false;
UnityEngine.Object uObj = null;
if (obj is UnityEngine.Object)
{
uObj = obj as UnityEngine.Object;
}
foreach (var window in Windows)
{
if (ReferenceEquals(obj, window.Target))
bool equals;
equals = ReferenceEquals(obj, window.Target);
if (!equals && uObj != null && window.Target is UnityEngine.Object uTarget)
{
GUI.BringWindowToFront(window.windowID);
GUI.FocusWindow(window.windowID);
equals = uObj.m_CachedPtr == uTarget.m_CachedPtr;
}
if (equals)
{
return window;
}
}
@ -181,7 +193,10 @@ namespace Explorer
GUILayout.EndHorizontal();
}
catch { }
catch //(Exception e)
{
//MelonLogger.Log("Exception on GuiResize: " + e.GetType() + ", " + e.Message);
}
return _rect;
}