void PopulateAllLoaderInfos() { m_AllLoaderInfos.Clear(); XRLoaderInfo.GetAllKnownLoaderInfos(m_AllLoaderInfos); }
void UpdatePackageManagerQuery() { Repaint(); EditorApplication.update -= UpdatePackageManagerQuery; if (m_PackageRepositoryListRequest == null) { return; } if (!m_PackageRepositoryListRequest.IsCompleted || !m_LocalPackageListRequest.IsCompleted) { EditorApplication.update += UpdatePackageManagerQuery; return; } m_HasCompletedRequest = true; m_HasInstalledProviders = false; if (m_PackageRepositoryListRequest.Status != StatusCode.Success) { m_HasProviders = false; m_PackageRepositoryListRequest = null; return; } foreach (var pinfo in m_LocalPackageListRequest.Result) { var xrp = from keyword in pinfo.keywords where String.Compare("xreditorsubsystem", keyword, true) == 0 select keyword; if (xrp.Any()) { XRPackageInformation xrpinfo = new XRPackageInformation(); xrpinfo.uninstalledPackageInfo = pinfo; xrpinfo.isInstalled = true; xrpinfo.isLocalOnly = true; m_HasInstalledProviders = true; m_XRPackages.Add(pinfo.name, xrpinfo); } } foreach (var pinfo in m_PackageRepositoryListRequest.Result) { if (m_XRPackages.ContainsKey(pinfo.name)) { XRPackageInformation xrpinfo; if (m_XRPackages.TryGetValue(pinfo.name, out xrpinfo)) { xrpinfo.isLocalOnly = false; m_XRPackages[pinfo.name] = xrpinfo; } continue; } var xrp = from keyword in pinfo.keywords where String.Compare("xreditorsubsystem", keyword, true) == 0 select keyword; if (xrp.Any()) { XRPackageInformation xrpinfo = new XRPackageInformation(); xrpinfo.uninstalledPackageInfo = pinfo; xrpinfo.isInstalled = false; m_XRPackages.Add(pinfo.name, xrpinfo); } } List <XRLoaderInfo> onDiskLoaderInfos = new List <XRLoaderInfo>(); XRLoaderInfo.GetAllKnownLoaderInfos(onDiskLoaderInfos); m_HasKNownLocalLoaders = onDiskLoaderInfos.Any(); m_HasProviders = m_XRPackages.Any(); m_PackageRepositoryListRequest = null; }