private UpmClientInternal() { m_SearchOperation = new UpmSearchOperation(); m_SearchOfflineOperation = new UpmSearchOperation(); m_ListOperation = new UpmListOperation(); m_ListOfflineOperation = new UpmListOperation(); m_AddOperation = new UpmAddOperation(); m_RemoveOperation = new UpmRemoveOperation(); m_EmbedOperation = new UpmEmbedOperation(); }
public void ExtraFetch(string packageIdOrName) { if (m_ExtraFetchOperations.ContainsKey(packageIdOrName)) { return; } var operation = new UpmSearchOperation(); operation.Search(packageIdOrName); operation.onProcessResult += OnProcessExtraFetchResult; operation.onOperationError += error => Debug.LogError($"Error searching for package {packageIdOrName} online."); m_ExtraFetchOperations[packageIdOrName] = operation; }
private void ExtraFetchInternal(string packageIdOrName, string productId = null) { if (m_ExtraFetchOperations.ContainsKey(packageIdOrName)) { return; } var operation = new UpmSearchOperation(); operation.Search(packageIdOrName, productId); operation.onProcessResult += (requst) => OnProcessExtraFetchResult(requst, productId); operation.onOperationError += (op, error) => OnProcessExtraFetchError(error, productId); operation.onOperationFinalized += (op) => OnExtraFetchFinalized(packageIdOrName); m_ExtraFetchOperations[packageIdOrName] = operation; }