fix:GameObjectInspector can't show

This commit is contained in:
yukieiji 2023-03-14 02:11:44 +09:00
parent 1e1fb0e27b
commit f225b8ce5c
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ namespace UnityExplorer.Inspectors
{
public class GameObjectInspector : InspectorBase
{
public new GameObject Target => base.Target as GameObject;
public new GameObject Target => base.Target.TryCast<GameObject>();
public GameObject Content;
@ -31,7 +31,7 @@ namespace UnityExplorer.Inspectors
{
base.OnBorrowedFromPool(target);
base.Target = target as GameObject;
base.Target = target.TryCast<GameObject>();
Controls.UpdateGameObjectInfo(true, true);
Controls.TransformControl.UpdateTransformControlValues(true);

View File

@ -27,7 +27,7 @@ namespace UnityExplorer
if (TryFocusActiveInspector(obj))
return;
if (obj is GameObject)
if (obj.TryCast<GameObject>() is not null)
CreateInspector<GameObjectInspector>(obj);
else
CreateInspector<ReflectionInspector>(obj, false, parent);