Пример #1
0
        public static void ShowInspector(UnityEngine.Object _target)
        {
            if (wnd != null)
            {
                wnd.Close();
            }
            wnd         = null;
            _target_obj = null;

            _target_obj = _target;
            OpenUI();
        }
Пример #2
0
 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();
     }
 }
Пример #3
0
 private void OnDestroy()
 {
     wnd         = null;
     _target_obj = null;
 }