mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-16 00:07:52 +08:00
1.5.2
* Added ability to force Reflection Inspector for GameObjects and Transforms if you hold Left Shift while clicking the Inspect button * Fixed a bug causing duplicate windows to open when you inspect Transforms, the current active window will now be focused. Note: does not apply if you hold Left Shift for forced reflection.
This commit is contained in:
@ -10,32 +10,9 @@ namespace Explorer
|
||||
{
|
||||
public class CacheGameObject : CacheObjectBase
|
||||
{
|
||||
private GameObject GameObj
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_gameObject == null)
|
||||
{
|
||||
if (Value is Il2CppSystem.Object ilObj)
|
||||
{
|
||||
var ilType = ilObj.GetIl2CppType();
|
||||
|
||||
if (ilType == ReflectionHelpers.GameObjectType || ilType == ReflectionHelpers.TransformType)
|
||||
{
|
||||
m_gameObject = ilObj.TryCast<GameObject>() ?? ilObj.TryCast<Transform>()?.gameObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m_gameObject;
|
||||
}
|
||||
}
|
||||
|
||||
private GameObject m_gameObject;
|
||||
|
||||
public override void DrawValue(Rect window, float width)
|
||||
{
|
||||
UIHelpers.GameobjButton(GameObj, null, false, width);
|
||||
UIHelpers.GameobjButton(Value, null, false, width);
|
||||
}
|
||||
|
||||
public override void UpdateValue()
|
||||
|
Reference in New Issue
Block a user