Esempio n. 1
0
    public static AdapterInspectorWindows ShowWindows(Object target, SerializedObject so, Action closeCall)
    {
        AdapterInspectorWindows windows = EditorWindow.GetWindow <AdapterInspectorWindows>(false, "编辑窗口", true);

        windows.Show();
        windows.Target           = target;
        windows.serializedObject = so;
        windows.closeCall        = closeCall;
        windows.winState         = 1;
        EditorWindow.FocusWindowIfItsOpen <AdapterInspectorWindows>();
        return(windows);
    }
Esempio n. 2
0
    public override void OnInspectorGUI()
    {
        //try
        //{

        if (GUILayout.Button("窗口") || (windows != null && windows.winState == 2))
        {
            windows = AdapterInspectorWindows.ShowWindows(target, serializedObject, CloseWindows);
        }
        AdapterInspector.SetTarget(target, serializedObject);

        //}
        //catch (Exception e)
        //{

        //    Debug.LogWarning(e.ToString());
        //}
    }
Esempio n. 3
0
 void CloseWindows()
 {
     windows = null;
 }