Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 30b48b1

Browse files
committed
1.4.6
* Fix a bug with the Scene Explorer Search feature (not Object search) * Simplified parsing of primitive values to a better method
1 parent 0fd382c commit 30b48b1

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CppExplorer [![Version](https://img.shields.io/badge/MelonLoader-0.2.7-green.svg)]()
1+
# CppExplorer [![Version](https://img.shields.io/badge/MelonLoader-0.2.7.1-green.svg)]()
22

33
<p align="center">
44
<img align="center" src="https://sinai-dev.github.io/images/thumbs/02.png">

src/CachedObjects/CachePrimitive.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,7 @@ public MethodInfo ParseMethod
2828
{
2929
if (m_parseMethod == null)
3030
{
31-
Type t = null;
32-
switch (PrimitiveType)
33-
{
34-
case PrimitiveTypes.Bool:
35-
t = typeof(bool); break;
36-
case PrimitiveTypes.Double:
37-
t = typeof(double); break;
38-
case PrimitiveTypes.Float:
39-
t = typeof(float); break;
40-
case PrimitiveTypes.Int:
41-
t = typeof(int); break;
42-
case PrimitiveTypes.Char:
43-
t = typeof(char); break;
44-
}
45-
m_parseMethod = t?.GetMethod("Parse", new Type[] { typeof(string) });
31+
m_parseMethod = Value.GetType().GetMethod("Parse", new Type[] { typeof(string) });
4632
}
4733
return m_parseMethod;
4834
}

src/CppExplorer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Explorer
1212
public class CppExplorer : MelonMod
1313
{
1414
public const string GUID = "com.sinai.cppexplorer";
15-
public const string VERSION = "1.4.5";
15+
public const string VERSION = "1.4.6";
1616
public const string AUTHOR = "Sinai";
1717

1818
public const string NAME = "CppExplorer"

src/MainMenu/Pages/ScenePage.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,24 @@ private void DrawSearchResultsList()
350350
m_pageOffset = 0;
351351
}
352352

353-
for (int i = offset; i < offset + m_limit && offset < m_searchResults.Count; i++)
353+
for (int i = offset; i < offset + m_limit && i < m_searchResults.Count; i++)
354354
{
355355
var obj = m_searchResults[i];
356356

357-
UIHelpers.FastGameobjButton(obj.RefGameObject, obj.EnabledColor, obj.Label, obj.RefGameObject.activeSelf, SetTransformTarget, true, MainMenu.MainRect.width - 170);
357+
if (obj.RefGameObject)
358+
{
359+
UIHelpers.FastGameobjButton(obj.RefGameObject,
360+
obj.EnabledColor,
361+
obj.Label,
362+
obj.RefGameObject.activeSelf,
363+
SetTransformTarget,
364+
true,
365+
MainMenu.MainRect.width - 170);
366+
}
367+
else
368+
{
369+
GUILayout.Label("<i><color=red>Null or destroyed!</color></i>", null);
370+
}
358371
}
359372
}
360373
else

0 commit comments

Comments
 (0)