public void ShowChooseMainRepositoryPathPopup(EditorWindow context = null) { var rootProjectPath = paths.ProjectPath; var repoPath = EditorUtility.OpenFolderPanel("Repository Path", rootProjectPath, ""); if (string.IsNullOrEmpty(repoPath)) { return; } bool isRootPath = UniGitPathHelper.PathsEqual(repoPath, rootProjectPath); bool isChildOfRoot = UniGitPathHelper.IsSubDirectoryOf(repoPath, rootProjectPath); if (isRootPath || isChildOfRoot) { if (isRootPath) { EditorPrefs.DeleteKey(UniGitLoader.RepoPathKey); } else { string localPath = repoPath.Replace(rootProjectPath + UniGitPathHelper.UnityDeirectorySeparatorChar, ""); EditorPrefs.SetString(UniGitLoader.RepoPathKey, localPath); } paths.SetRepoPath(repoPath); initializer.RecompileSoft(); } else if (context) { context.ShowNotification(new GUIContent("Invalid Path !")); } }