示例#1
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_Application = container.Resolve <ApplicationProxy>();
            m_AssetStoreDownloadManager = container.Resolve <AssetStoreDownloadManager>();
            m_AssetStoreCache           = container.Resolve <AssetStoreCache>();
            m_PackageManagerPrefs       = container.Resolve <PackageManagerPrefs>();
            m_PackageDatabase           = container.Resolve <PackageDatabase>();
            m_PageManager       = container.Resolve <PageManager>();
            m_UnityConnectProxy = container.Resolve <UnityConnectProxy>();
        }
示例#2
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_ResourceLoader      = container.Resolve <ResourceLoader>();
            m_ExtensionManager    = container.Resolve <ExtensionManager>();
            m_Application         = container.Resolve <ApplicationProxy>();
            m_PackageManagerPrefs = container.Resolve <PackageManagerPrefs>();
            m_PackageDatabase     = container.Resolve <PackageDatabase>();
            m_PageManager         = container.Resolve <PageManager>();
            m_UnityConnectProxy   = container.Resolve <UnityConnectProxy>();
        }
示例#3
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_ResourceLoader      = container.Resolve <ResourceLoader>();
            m_UnityConnect        = container.Resolve <UnityConnectProxy>();
            m_PackageFiltering    = container.Resolve <PackageFiltering>();
            m_PackageManagerPrefs = container.Resolve <PackageManagerPrefs>();
            m_PageManager         = container.Resolve <PageManager>();
            m_AssetStoreCallQueue = container.Resolve <AssetStoreCallQueue>();
            m_SettingsProxy       = container.Resolve <PackageManagerProjectSettingsProxy>();
        }
示例#4
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_ResourceLoader            = container.Resolve <ResourceLoader>();
            m_Application               = container.Resolve <ApplicationProxy>();
            m_PackageDatabase           = container.Resolve <PackageDatabase>();
            m_PageManager               = container.Resolve <PageManager>();
            m_PackageManagerPrefs       = container.Resolve <PackageManagerPrefs>();
            m_AssetStoreClient          = container.Resolve <AssetStoreClient>();
            m_AssetStoreDownloadManager = container.Resolve <AssetStoreDownloadManager>();
            m_AssetStoreCache           = container.Resolve <AssetStoreCache>();
            m_AssetStoreCallQueue       = container.Resolve <AssetStoreCallQueue>();
            m_PackageFiltering          = container.Resolve <PackageFiltering>();
        }
示例#5
0
 public PackageManagerWindowRoot(ResourceLoader resourceLoader,
                                 ExtensionManager extensionManager,
                                 SelectionProxy selection,
                                 PackageFiltering packageFiltering,
                                 PackageManagerPrefs packageManagerPrefs,
                                 PackageDatabase packageDatabase,
                                 PageManager pageManager,
                                 PackageManagerProjectSettingsProxy settingsProxy,
                                 UnityConnectProxy unityConnectProxy,
                                 ApplicationProxy applicationProxy,
                                 UpmClient upmClient,
                                 AssetStoreCachePathProxy assetStoreCachePathProxy)
 {
     ResolveDependencies(resourceLoader, extensionManager, selection, packageFiltering, packageManagerPrefs, packageDatabase, pageManager, settingsProxy, unityConnectProxy, applicationProxy, upmClient, assetStoreCachePathProxy);
 }
示例#6
0
        private void ResolveDependencies()
        {
            var container = ServicesContainer.instance;

            m_ResourceLoader      = container.Resolve <ResourceLoader>();
            m_SettingsProxy       = container.Resolve <PackageManagerProjectSettingsProxy>();
            m_PackageDatabase     = container.Resolve <PackageDatabase>();
            m_PackageManagerPrefs = container.Resolve <PackageManagerPrefs>();
            m_Selection           = container.Resolve <SelectionProxy>();
            m_AssetDatabase       = container.Resolve <AssetDatabaseProxy>();
            m_Application         = container.Resolve <ApplicationProxy>();
            m_IOProxy             = container.Resolve <IOProxy>();
            m_AssetStoreCache     = container.Resolve <AssetStoreCache>();
            m_PageManager         = container.Resolve <PageManager>();
            m_UpmCache            = container.Resolve <UpmCache>();
        }
示例#7
0
        public PackageDetailsVersionsTab(ResourceLoader resourceLoader,
                                         ApplicationProxy applicationProxyProxy,
                                         PackageManagerPrefs packageManagerPrefs,
                                         PackageDatabase packageDatabase,
                                         PageManager pageManager,
                                         PackageManagerProjectSettingsProxy settingsProxy,
                                         UpmCache upmCache,
                                         IOProxy ioProxy)
        {
            m_Id                  = k_Id;
            m_DisplayName         = L10n.Tr("Version History");
            m_ResourceLoader      = resourceLoader;
            m_ApplicationProxy    = applicationProxyProxy;
            m_PackageManagerPrefs = packageManagerPrefs;
            m_PackageDatabase     = packageDatabase;
            m_PageManager         = pageManager;
            m_SettingsProxy       = settingsProxy;
            m_UpmCache            = upmCache;
            m_IOProxy             = ioProxy;

            m_DisableIfCompiling = new ButtonDisableCondition(() => m_ApplicationProxy.isCompiling,
                                                              L10n.Tr("You need to wait until the compilation is finished to perform this action."));
            m_DisableIfInstallOrUninstallInProgress = new ButtonDisableCondition(() => m_PackageDatabase.isInstallOrUninstallInProgress,
                                                                                 L10n.Tr("You need to wait until other install or uninstall operations are finished to perform this action."));

            m_Container = new VisualElement {
                name = "versionsTab"
            };
            Add(m_Container);

            m_VersionHistoryList = new VisualElement {
                name = "versionsList"
            };
            m_Container.Add(m_VersionHistoryList);

            m_VersionsToolbar = new VisualElement {
                name = "versionsToolbar"
            };
            m_Container.Add(m_VersionsToolbar);

            m_VersionsShowOthersButton = new Button {
                name = "versionsShowAllButton", text = L10n.Tr("See other versions")
            };
            m_VersionsToolbar.Add(m_VersionsShowOthersButton);

            m_VersionsShowOthersButton.clickable.clicked += ShowOthersVersion;
        }
        public ServicesContainer()
        {
            // In the constructor we only need to worry about creating a brand new instance.
            // In the case of assembly reload, a deserialize step will automatically happen after the constructor
            // to restore all the serializable states/services and we don't need to worry about that
            m_HttpClientFactory    = new HttpClientFactory();
            m_UnityOAuthProxy      = new UnityOAuthProxy();
            m_SelectionProxy       = new SelectionProxy();
            m_AssetDatabaseProxy   = new AssetDatabaseProxy();
            m_UnityConnectProxy    = new UnityConnectProxy();
            m_ApplicationProxy     = new ApplicationProxy();
            m_EditorAnalyticsProxy = new EditorAnalyticsProxy();
            m_IOProxy       = new IOProxy();
            m_SettingsProxy = new PackageManagerProjectSettingsProxy();
            m_ClientProxy   = new ClientProxy();

            m_ResourceLoader   = new ResourceLoader();
            m_ExtensionManager = new ExtensionManager();

            m_AssetStoreCache           = new AssetStoreCache();
            m_AssetStoreClient          = new AssetStoreClient();
            m_AssetStoreOAuth           = new AssetStoreOAuth();
            m_AssetStoreUtils           = new AssetStoreUtils();
            m_AssetStoreRestAPI         = new AssetStoreRestAPI();
            m_AssetStoreDownloadManager = new AssetStoreDownloadManager();
            m_AssetStoreCallQueue       = new AssetStoreCallQueue();
            m_AssetStoreCachePathProxy  = new AssetStoreCachePathProxy();

            m_UpmCache           = new UpmCache();
            m_UpmClient          = new UpmClient();
            m_UpmRegistryClient  = new UpmRegistryClient();
            m_UpmCacheRootClient = new UpmCacheRootClient();

            m_PackageFiltering    = new PackageFiltering();
            m_PackageManagerPrefs = new PackageManagerPrefs();

            m_PackageDatabase = new PackageDatabase();
            m_PageManager     = new PageManager();

            // Since dictionaries doesn't survive through serialization, we always re-create the default registration
            m_RegisteredObjects = new Dictionary <Type, object>();
            RegisterDefaultServices();

            m_DependenciesResolved = false;
            m_InitializeState      = State.NotInitialized;
        }
        public FeatureDependenciesTab(ResourceLoader resourceLoader,
                                      PackageDatabase packageDatabase,
                                      PackageManagerPrefs packageManagerPrefs,
                                      PackageManagerProjectSettingsProxy settingsProxy,
                                      ApplicationProxy applicationProxy)
        {
            m_ResourceLoader      = resourceLoader;
            m_PackageDatabase     = packageDatabase;
            m_PackageManagerPrefs = packageManagerPrefs;
            m_SettingsProxy       = settingsProxy;
            m_Application         = applicationProxy;

            m_Id          = k_Id;
            m_DisplayName = L10n.Tr("Packages Included");

            var root = m_ResourceLoader.GetTemplate("FeatureDependencies.uxml");

            Add(root);

            cache = new VisualElementCache(root);
            dependencyInfoBox.Q <Button>().clickable.clicked += () => m_Application.OpenURL($"{infoBoxUrl}/{m_Link}");
        }
示例#10
0
 public void ResolveDependencies(PackageManagerPrefs packageManagerPrefs)
 {
     m_PackageManagerPrefs = packageManagerPrefs;
 }