// Show Window //-------------------------------------------------------------- public static object ShowDialog(apEditor editor, apMeshGroup srcMeshGroup, FUNC_SELECT_TRANSFORM_RESULT funcResult) { CloseDialog(); if (editor == null || editor._portrait == null) { return(null); } EditorWindow curWindow = EditorWindow.GetWindow(typeof(apDialog_AddChildTransform), true, "Add Mesh/MeshGroup", true); apDialog_AddChildTransform curTool = curWindow as apDialog_AddChildTransform; object loadKey = new object(); if (curTool != null && curTool != s_window) { s_window = curTool; s_window.position = new Rect(100, 100, 250, 400); s_window.Init(editor, loadKey, srcMeshGroup, funcResult); return(loadKey); } else { return(null); } }
private static void CloseDialog() { if (s_window != null) { try { s_window.Close(); } catch (Exception ex) { Debug.LogError("Close Exception : " + ex); } s_window = null; } }