mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-01-04 00:23:31 +08:00
1.4.6
* Fix a bug with the Scene Explorer Search feature (not Object search) * Simplified parsing of primitive values to a better method
This commit is contained in:
parent
0fd382c1f6
commit
30b48b1f1f
@ -1,4 +1,4 @@
|
|||||||
# CppExplorer [![Version](https://img.shields.io/badge/MelonLoader-0.2.7-green.svg)]()
|
# CppExplorer [![Version](https://img.shields.io/badge/MelonLoader-0.2.7.1-green.svg)]()
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img align="center" src="https://sinai-dev.github.io/images/thumbs/02.png">
|
<img align="center" src="https://sinai-dev.github.io/images/thumbs/02.png">
|
||||||
|
@ -28,21 +28,7 @@ namespace Explorer
|
|||||||
{
|
{
|
||||||
if (m_parseMethod == null)
|
if (m_parseMethod == null)
|
||||||
{
|
{
|
||||||
Type t = null;
|
m_parseMethod = Value.GetType().GetMethod("Parse", new Type[] { typeof(string) });
|
||||||
switch (PrimitiveType)
|
|
||||||
{
|
|
||||||
case PrimitiveTypes.Bool:
|
|
||||||
t = typeof(bool); break;
|
|
||||||
case PrimitiveTypes.Double:
|
|
||||||
t = typeof(double); break;
|
|
||||||
case PrimitiveTypes.Float:
|
|
||||||
t = typeof(float); break;
|
|
||||||
case PrimitiveTypes.Int:
|
|
||||||
t = typeof(int); break;
|
|
||||||
case PrimitiveTypes.Char:
|
|
||||||
t = typeof(char); break;
|
|
||||||
}
|
|
||||||
m_parseMethod = t?.GetMethod("Parse", new Type[] { typeof(string) });
|
|
||||||
}
|
}
|
||||||
return m_parseMethod;
|
return m_parseMethod;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ namespace Explorer
|
|||||||
public class CppExplorer : MelonMod
|
public class CppExplorer : MelonMod
|
||||||
{
|
{
|
||||||
public const string GUID = "com.sinai.cppexplorer";
|
public const string GUID = "com.sinai.cppexplorer";
|
||||||
public const string VERSION = "1.4.5";
|
public const string VERSION = "1.4.6";
|
||||||
public const string AUTHOR = "Sinai";
|
public const string AUTHOR = "Sinai";
|
||||||
|
|
||||||
public const string NAME = "CppExplorer"
|
public const string NAME = "CppExplorer"
|
||||||
|
@ -350,11 +350,24 @@ namespace Explorer
|
|||||||
m_pageOffset = 0;
|
m_pageOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = offset; i < offset + m_limit && offset < m_searchResults.Count; i++)
|
for (int i = offset; i < offset + m_limit && i < m_searchResults.Count; i++)
|
||||||
{
|
{
|
||||||
var obj = m_searchResults[i];
|
var obj = m_searchResults[i];
|
||||||
|
|
||||||
UIHelpers.FastGameobjButton(obj.RefGameObject, obj.EnabledColor, obj.Label, obj.RefGameObject.activeSelf, SetTransformTarget, true, MainMenu.MainRect.width - 170);
|
if (obj.RefGameObject)
|
||||||
|
{
|
||||||
|
UIHelpers.FastGameobjButton(obj.RefGameObject,
|
||||||
|
obj.EnabledColor,
|
||||||
|
obj.Label,
|
||||||
|
obj.RefGameObject.activeSelf,
|
||||||
|
SetTransformTarget,
|
||||||
|
true,
|
||||||
|
MainMenu.MainRect.width - 170);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GUILayout.Label("<i><color=red>Null or destroyed!</color></i>", null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user