private void OnGUI() { if (UPM.RemoteSources.Repositories.Count == 0) { UPM.LoadRemoteRepos(); } DrawMainMenu(); DrawRepositorySelector(); DrawOutputConsole(); }
private static void OpenPackageManager() { if (!window) { window = Editor.CreateInstance <UPMWindow>(); } UPM.LoadRemoteRepos(); if (!GitCommand.IsGitInstalled) { EditorUtility.DisplayDialog("Error", "Git not installed UPM will not work until you have installed Git on your computer.", "Ok"); } else { window.Show(); } }
private void DrawRepositorySelector() { GUILayout.BeginHorizontal(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); foreach (var repo in UPM.RemoteSources.Repositories) { GUILayout.BeginHorizontal(); GUILayout.Label(repo.PackageName, GUILayout.Width(200)); GUILayout.Button("Package Description"); if (GUILayout.Button("Install Package")) { UPM.PullPackage(repo); } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); GUILayout.EndHorizontal(); }
private static void createDummyRepos() { UPM.SaveRepositoriesList(UPM.UPM_MASTER_REPOS_LOCAL); }
private static void UpdateRemoteRepos() { UPM.CheckForUpdates(); }