static void Init() { ReadMeEditor window = (ReadMeEditor)EditorWindow.GetWindow(typeof(ReadMeEditor)); window.titleContent = new GUIContent("Read Me"); window.Show(); }
void OnGUI() { if (GUILayout.Button("Lock Selection: " + m_lockState)) { m_lockState = !m_lockState; } if (!Directory.Exists(m_selector.GetAbsolutePath(true))) { m_lockState = false; } if (!m_lockState) { UnityPathSelectionInfo.Get(out m_pathFound, out m_selector); } string previous = m_info.m_focusPath; m_info.m_focusPath = m_selector.GetAbsolutePath(true); if (previous != m_info.m_focusPath) { RefreshAccess(); } EditorGUILayout.TextField(m_selector.GetRelativePath(true)); EditorGUILayout.TextField(m_selector.GetAbsolutePath(true)); m_info.m_scollrPackagePosition = GUILayout.BeginScrollView(m_info.m_scollrPackagePosition); GUILayout.Label("Welcome", EditorStyles.boldLabel); GUILayout.Label("This window allow you to read write config package."); GUILayout.Space(10); m_info.m_hideHiddenTool = EditorGUILayout.Foldout(m_info.m_hideHiddenTool, m_info.m_hideHiddenTool ? "→ Doc & Sample" : "↓ Doc & Sample", EditorStyles.boldLabel); if (!m_info.m_hideHiddenTool) { ToggleAndCreateHiddenFolder(); } ReadMeEditor.DrawEditorDefaultInterface(m_info.m_readMe, ref m_info.m_gitLink, ref m_info.m_tmpReadMeText, ref m_info.m_tmpReadMeHide); ChangeLogEditor.DrawEditorDefaultInterface(m_info.m_changelog, ref m_info.m_tmpLogVersion, ref m_info.m_tmpLogTitle, ref m_info.m_tmpLogNew, ref m_info.m_tmpLogHide); LicenseEditor.DrawEditorDefaultInterface(m_info.m_license, ref m_info.m_tmpLicenseLink, ref m_info.m_tmpLicenseText, ref m_info.tmpLicenseHide); //CreatePackageDirectories(); GUILayout.EndScrollView(); }