private void OnGUI() { EditorGUI.BeginDisabledGroup(m_IsOpenPopup); if (m_Data == null) { EditorGUILayout.LabelField(ContentFileNotFound, RedTextLabelStyle); EditorGUI.BeginChangeCheck(); m_Data = (BookmarkData)EditorGUILayout.ObjectField(m_Data, typeof(BookmarkData), false); UpdateTreeView(); } if (m_TreeView == null) { UpdateTreeView(); } DrawHeader(); CustomUI.RenderTable(m_TreeView, ref m_TableScroll); // URL一覧を表示 EditorGUI.EndDisabledGroup(); if (m_NeedOpenPopup) { m_NeedOpenPopup = false; var rect = GUILayoutUtility.GetLastRect(); // OnGUI以外で呼ぶとエラー PopupWindow.Show(rect, PopupContent); } }
private void OnGUI() { if (m_Data == null) { EditorGUILayout.LabelField(ContentFileNotFound, RedTextLabelStyle); m_Data = (BookmarkData)EditorGUILayout.ObjectField(m_Data, typeof(BookmarkData), false); } if (m_List == null) { CreateList(); } m_List.DoLayoutList(); }
private void OnEnable() { m_Data = m_Data ?? (BookmarkData)AssetDatabase.LoadAssetAtPath(EditorSettings.DATA_PATH, typeof(BookmarkData)); }