public static void ShowInspector(UnityEngine.Object _target) { if (wnd != null) { wnd.Close(); } wnd = null; _target_obj = null; _target_obj = _target; OpenUI(); }
private static void OpenUI() { if (_target_obj == null) { return; } if (wnd == null) { wnd = GetWindow <InspectorInWindow>(); wnd.titleContent = new GUIContent($"Inspector: [{_target_obj.name}]-{_target_obj.GetType().Name}"); } else { wnd.Show(); wnd.Focus(); } }
private void OnDestroy() { wnd = null; _target_obj = null; }