From 3362c24a504ef4ada9bbf61f9139c394b633e082 Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Thu, 27 May 2021 12:00:49 +0100 Subject: [PATCH 1/2] Updated UnityWebRequest to UnityWebRequestAssetBundle due to former being obsolete --- http/auth/Auth.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/auth/Auth.cs b/http/auth/Auth.cs index 4214224..4ac5510 100644 --- a/http/auth/Auth.cs +++ b/http/auth/Auth.cs @@ -44,7 +44,7 @@ public static StorageRequest GetAuthorizedStorageRequestAudioClip(StorageService public static StorageRequest GetAuthorizedStorageRequestAssetBundle(StorageServiceClient client, string resourcePath = "", Dictionary queryParams = null, Dictionary headers = null, int contentLength = 0) { string requestUrl = RequestUrl(client, queryParams, resourcePath); - StorageRequest request = new StorageRequest(UnityWebRequest.GetAssetBundle(requestUrl)); + StorageRequest request = new StorageRequest(UnityWebRequestAssetBundle.GetAssetBundle(requestUrl)); request.AuthorizeRequest(client, Method.GET, resourcePath, queryParams, headers, contentLength); return request; } From 5f889da27cbb41eeabfe756d452d231f7398d015 Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Fri, 4 Jun 2021 11:43:42 +0100 Subject: [PATCH 2/2] Included obsolete GetAssetBundle call for Unity versions 2017 and earlier --- http/auth/Auth.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/http/auth/Auth.cs b/http/auth/Auth.cs index 4ac5510..511be48 100644 --- a/http/auth/Auth.cs +++ b/http/auth/Auth.cs @@ -44,7 +44,13 @@ public static StorageRequest GetAuthorizedStorageRequestAudioClip(StorageService public static StorageRequest GetAuthorizedStorageRequestAssetBundle(StorageServiceClient client, string resourcePath = "", Dictionary queryParams = null, Dictionary headers = null, int contentLength = 0) { string requestUrl = RequestUrl(client, queryParams, resourcePath); + +#if UNITY_2018_1_OR_NEWER StorageRequest request = new StorageRequest(UnityWebRequestAssetBundle.GetAssetBundle(requestUrl)); +#else + StorageRequest request = new StorageRequest(UnityWebRequest.GetAssetBundle(requestUrl)); +#endif + request.AuthorizeRequest(client, Method.GET, resourcePath, queryParams, headers, contentLength); return request; }