internal static void SelectPackageAndFilterStatic(string packageToSelect, PackageFilterTab?filterTab = null, bool refresh = false, string searchText = "")
 {
     instance         = GetWindow <PackageManagerWindow>();
     instance.minSize = new Vector2(800, 250);
     instance.m_Root.SelectPackageAndFilter(packageToSelect, filterTab, refresh, searchText);
     instance.Show();
 }
 internal static void SelectFilterSubPageStatic(string filterTabOrSubPage = "")
 {
     instance         = GetWindow <PackageManagerWindow>();
     instance.minSize = new Vector2(800, 250);
     instance.m_Root.SelectFilterSubPage(filterTabOrSubPage);
     instance.Show();
 }
Пример #3
0
        internal static void SelectPackageAndFilter(string packageIdOrDisplayName, PackageFilterTab?filterTab = null, bool refresh = false, string searchText = "")
        {
            instance         = GetWindow <PackageManagerWindow>(typeof(SceneView));
            instance.minSize = new Vector2(700, 250);
            if (!string.IsNullOrEmpty(packageIdOrDisplayName) || filterTab != null)
            {
                if (filterTab == null)
                {
                    IPackageVersion version;
                    IPackage        package;
                    PackageDatabase.instance.GetPackageAndVersionByIdOrName(packageIdOrDisplayName, out package, out version);
                    filterTab = PageManager.instance.FindTab(package, version);
                }

                instance.m_FilterToSelectAfterLoad = filterTab;
                instance.m_PackageToSelectOnLoaded = packageIdOrDisplayName;
                instance.packageManagerToolbar.SetCurrentSearch(searchText);

                if (refresh || PackageDatabase.instance.isEmpty)
                {
                    instance.DelayRefresh((PackageFilterTab)filterTab);
                }
                else
                {
                    instance.SelectPackageAndFilter();
                }
            }
            instance.Show();
        }
Пример #4
0
        internal static void SelectPackageAndFilter(string packageIdOrDisplayName, PackageFilterTab?filterTab = null, bool refresh = false, string searchText = "")
        {
            instance         = GetWindow <PackageManagerWindow>();
            instance.minSize = new Vector2(700, 250);
            if (!string.IsNullOrEmpty(packageIdOrDisplayName) || filterTab != null)
            {
                if (filterTab == null)
                {
                    filterTab = PageManager.instance.FindTab(packageIdOrDisplayName);
                }

                instance.m_FilterToSelectAfterLoad = filterTab;
                instance.m_PackageToSelectOnLoaded = packageIdOrDisplayName;
                instance.packageManagerToolbar.SetCurrentSearch(searchText);

                if (refresh || PackageDatabase.instance.isEmpty)
                {
                    PageManager.instance.Refresh(filterTab);
                }
                else
                {
                    instance.SelectPackageAndFilter();
                }
            }
            instance.Show();
        }
Пример #5
0
 internal static void SelectPackageAndFilter(string packageIdOrDisplayName, PackageFilterTab?filterTab = null, bool refresh = false, string searchText = "")
 {
     s_Window         = GetWindow <PackageManagerWindow>();
     s_Window.minSize = new Vector2(700, 250);
     if (!string.IsNullOrEmpty(packageIdOrDisplayName))
     {
         s_Window.packageManagerToolbar.SetCurrentSearch(searchText);
         s_Window.m_PackageToSelectOnLoaded = packageIdOrDisplayName;
         s_Window.m_FilterToSelectAfterLoad = filterTab;
         if (refresh)
         {
             PageManager.instance.Refresh(filterTab ?? PackageFilterTab.All);
         }
         else if (!PackageDatabase.instance.isEmpty)
         {
             s_Window.SelectPackageAndFilter();
         }
     }
     s_Window.Show();
 }