diff --git a/README.md b/README.md index 4f9b3ef..74b60dc 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ If you'd like to build this yourself, you will need to have installed BepInEx an 2. Open the `src\Explorer.csproj` file in a text editor. 3. Set the relevant `GameFolder` values for the versions you want to build, eg. set `MLCppGameFolder` if you want to build for a MelonLoader IL2CPP game. 4. Open the `src\Explorer.sln` project. -5. Select `Solution 'Explorer' (1 of 1 project)` in the Solution Explorer panel, and set the Active config property to the version you want to build, then build it. +5. Select `Solution 'UnityExplorer' (1 of 1 project)` in the Solution Explorer panel, and set the Active config property to the version you want to build, then build it. 5. The DLLs are built to the `Release\` folder in the root of the repository. 6. If ILRepack fails or is missing, use the NuGet package manager to re-install `ILRepack.Lib.MSBuild.Task`, then re-build. diff --git a/src/Inspectors/Reflection/CacheObject/CacheMember.cs b/src/Inspectors/Reflection/CacheObject/CacheMember.cs index c2e75c6..ffecaad 100644 --- a/src/Inspectors/Reflection/CacheObject/CacheMember.cs +++ b/src/Inspectors/Reflection/CacheObject/CacheMember.cs @@ -361,12 +361,13 @@ namespace UnityExplorer.Inspectors.Reflection rowLayout.minHeight = 25; rowLayout.flexibleWidth = 5000; var rowGroup = rowObj.GetComponent(); - rowGroup.childForceExpandHeight = true; + rowGroup.childForceExpandHeight = false; + rowGroup.childForceExpandWidth = true; rowGroup.spacing = 4; var argLabelObj = UIFactory.CreateLabel(rowObj, TextAnchor.MiddleLeft); - //var argLayout = argLabelObj.AddComponent(); - //argLayout.minWidth = 20; + var argLabelLayout = argLabelObj.AddComponent(); + argLabelLayout.minHeight = 25; var argText = argLabelObj.GetComponent(); var argTypeTxt = UISyntaxHighlight.ParseFullSyntax(arg.ParameterType, false); argText.text = $"{argTypeTxt} {arg.Name}"; @@ -374,6 +375,11 @@ namespace UnityExplorer.Inspectors.Reflection var argInputObj = UIFactory.CreateInputField(rowObj, 14, (int)TextAnchor.MiddleLeft, 1); var argInputLayout = argInputObj.AddComponent(); argInputLayout.flexibleWidth = 1200; + argInputLayout.preferredWidth = 150; + argInputLayout.minWidth = 20; + argInputLayout.minHeight = 25; + argInputLayout.flexibleHeight = 0; + argInputLayout.layoutPriority = 2; var argInput = argInputObj.GetComponent(); argInput.onValueChanged.AddListener((string val) => { m_argumentInput[i] = val; }); diff --git a/src/Inspectors/Reflection/CacheObject/CacheMethod.cs b/src/Inspectors/Reflection/CacheObject/CacheMethod.cs index e0f88f8..3415dd4 100644 --- a/src/Inspectors/Reflection/CacheObject/CacheMethod.cs +++ b/src/Inspectors/Reflection/CacheObject/CacheMethod.cs @@ -78,20 +78,10 @@ namespace UnityExplorer.Inspectors.Reflection ReflectionException = ReflectionHelpers.ExceptionToString(e); } + // todo do InitValue again for new value, in case type changed fundamentally. + IValue.Value = ret; IValue.OnValueUpdated(); - - //if (ret != null) - //{ - // //m_cachedReturnValue = CacheFactory.GetTypeAndCacheObject(ret); - // //m_cachedReturnValue = CacheFactory.GetCacheObject(ret); - // // m_cachedReturnValue.UpdateValue(); - - //} - //else - //{ - // m_cachedReturnValue = null; - //} } private MethodInfo MakeGenericMethodFromInput() diff --git a/src/Inspectors/Reflection/InteractiveValue/InteractiveValue.cs b/src/Inspectors/Reflection/InteractiveValue/InteractiveValue.cs index f9ecc98..9de7ac1 100644 --- a/src/Inspectors/Reflection/InteractiveValue/InteractiveValue.cs +++ b/src/Inspectors/Reflection/InteractiveValue/InteractiveValue.cs @@ -45,11 +45,13 @@ namespace UnityExplorer.Inspectors.Reflection if (OwnerCacheObject is CacheMember ownerMember && !string.IsNullOrEmpty(ownerMember.ReflectionException)) { m_text.text = "" + ownerMember.ReflectionException + ""; - return; + Value = null; + } + else + { + GetLabelForValue(); + m_text.text = RichTextValue; } - - GetLabelForValue(); - m_text.text = RichTextValue; bool shouldShowInspect = !Value.IsNullOrDestroyed(true); if (m_inspectButton.activeSelf != shouldShowInspect) diff --git a/src/Inspectors/Reflection/ReflectionInspector.cs b/src/Inspectors/Reflection/ReflectionInspector.cs index 457a312..ce21bbd 100644 --- a/src/Inspectors/Reflection/ReflectionInspector.cs +++ b/src/Inspectors/Reflection/ReflectionInspector.cs @@ -566,7 +566,7 @@ namespace UnityExplorer.Inspectors if (setEnabled) { - colors.normalColor = new Color(0.2f, 0.4f, 0.2f); + colors.normalColor = new Color(0.2f, 0.6f, 0.2f); m_memberFilter = type; m_lastActiveMemButton = btn; }