S3Client.GetObjectAsync
does not work with WebGL
#2981
-
I use the byte[] responseBody;
var task = s3Client.GetObjectAsync(request);
task.Wait();
using (GetObjectResponse response = task.Result)
using (Stream responseStream = response.ResponseStream)
using (BinaryReader reader = new(responseStream))
{
responseBody = reader.ReadBytes((int)reader.BaseStream.Length);
} It worked in Unity's Game View On Play, but when I build with WebGL and view it from the browser, I get the following error:
Asynchronous tasks don't seem to work in Unity's WebGL, is there a way to avoid the error? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@ma2yama Please see the https://github.com/aws/aws-sdk-unity-net#supported-platforms. Also refer the thread https://forum.unity.com/threads/aws-sdk-for-webgl.1435381/ on Unity forums. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@ma2yama Please see the https://github.com/aws/aws-sdk-unity-net#supported-platforms. Also refer the thread https://forum.unity.com/threads/aws-sdk-for-webgl.1435381/ on Unity forums.