public GameObjectControls(GameObjectInspector parent) { this.Parent = parent; ConstructTopInfo(); ConstructTransformControls(); }
public void Inspect(object obj, CacheObjectBase parentMember = null) { #if CPP obj = obj.Il2CppCast(ReflectionHelpers.GetActualType(obj)); #endif UnityEngine.Object unityObj = obj as UnityEngine.Object; if (obj.IsNullOrDestroyed(false)) { return; } // check if currently inspecting this object foreach (InspectorBase tab in m_currentInspectors) { if (ReferenceEquals(obj, tab.Target)) { SetInspectorTab(tab); return; } #if CPP else if (unityObj && tab.Target is UnityEngine.Object uTabObj) { if (unityObj.m_CachedPtr == uTabObj.m_CachedPtr) { SetInspectorTab(tab); return; } } #endif } InspectorBase inspector; if (obj is GameObject go) { inspector = new GameObjectInspector(go); } else { inspector = new InstanceInspector(obj); } if (inspector is ReflectionInspector ri) { ri.ParentMember = parentMember; } m_currentInspectors.Add(inspector); SetInspectorTab(inspector); }