Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unity][S3] No way to measure download progress #547

Closed
AndrewRH opened this issue Feb 8, 2017 · 28 comments
Closed

[Unity][S3] No way to measure download progress #547

AndrewRH opened this issue Feb 8, 2017 · 28 comments
Labels
closed-for-staleness feature-request A feature should be added or improved. Unity

Comments

@AndrewRH
Copy link

AndrewRH commented Feb 8, 2017

Using GetObjectAsync() in the Unity package there is no callback to measure download progress as there is with PostObjectAsync(). There seems to be WriteObjectProgressEvent in the normal .Net S3 package but this is missing from the Unity package.

@Ghopper21
Copy link

Thanks @AndrewRH for reporting this -- I am dealing with the same problem. Did you ever figure out a way to make this work?

@Mapiarz
Copy link

Mapiarz commented Feb 23, 2017

Hey! I'm in need of the same functionality. Both Unity WWW and UnityWebRequest classes support progress indication and there's already upload progress callback in AmazonS3Client for Unity. Does anyone with a better understanding of AWS S3 sdk has an idea how I could implement this myself?

@Ethan-VisualVocal
Copy link

I'd be nice to have this, as well as cancellation support.

@gokarnm gokarnm added the feature-request A feature should be added or improved. label Apr 5, 2017
@vrwalking
Copy link

i am also having the same problem. Is there any workaround for this?

@Astiolo
Copy link

Astiolo commented Sep 6, 2017

Also having the same problem, this seems like a pretty big oversight. Sometimes grabbing a relatively small file takes a long time and without a way of showing that it's still working, people just assume it's broken (including myself sometimes).

@olafolafsson
Copy link

olafolafsson commented Mar 2, 2018

The problem still does not seem to have an official solution. How did you guys manage to solve it ?

Could using AWS for .Net instead of AWS for Unity be a solution ? (I don't even know if this is possible)

@sayangel
Copy link

+1. We're having to resort to compiling the .NET sdk as a DLL to use download progress in Unity, but this seems silly considering there's a Unity library.

@olafolafsson
Copy link

olafolafsson commented Mar 16, 2018

A lighter solution using only the Unity sdk is given by @DaleEmrose here : amazon-archives/aws-sdk-unity#68 (pointed by this repository's FEATURE_REQUESTS.md file).
It's quite old so I had to adapt it a bit, I can provide some code if this can help.

@sayangel
Copy link

@olafolafsson awesome! Would love any tips. The current unity AWS SDK is distributed as a DLL and wouldn't want to go back to the old version just for this.

@Ethan-VisualVocal
Copy link

Ideally when Unity 2018.1 ships with official support for .NET Standard 2.0 (yay async and await!) we can just switch over to consuming "normal" version of this library and it just works. (I have my reservations, considering Unity keeps breaking random things in their iOS implementation of UnityWebRequest...)

Apparently this SDK targets .NET Standard 1.3: https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/welcome.html

@sayangel
Copy link

@olafolafsson nevermind, figured it out! The suggested solution worked great, thanks :)

@olafolafsson
Copy link

olafolafsson commented Mar 19, 2018

For future visitors of this page : in UnityMainThreadDispatcher.cs, for UnityRequests, you can use the variable uploadProgress to track the progress of a download, it is updated correctly for both download and upload operations.

Is that what you did @sayangel ? Glad the link helped you ! ;) Took me a while just to find it... !

@neoshamangames
Copy link

@olafolafsson nevermind, figured it out! The suggested solution worked great, thanks :)

What was the solution? I cannot modify UnityMainThreadDispatcher.cs because it is a dll in aws-sdk-unity_3.3.359.0

@sweatyc
Copy link

sweatyc commented Jan 10, 2019

Same here, UnityMainThreadDispatcher is in a dll and how can I workaround it?

@alejandroesteban
Copy link

Hello dear friends, the same thing happened to me. I could not make the changes because they are now delivered in the form of .dll the AWS SDK. So, using the latest AWS SDK version of .NET (3.3.505.1), re-package it for unity by adding the changes to get the% progress of the download.

https://github.com/alejandroesteban/AWS_CUSTOM
or package
https://drive.google.com/file/d/1CFO01BrOqIeu97cDIzoBs5v1GL-AruHK/view?usp=sharing

It works in version 2019.1.0f2.
Try it and hopefully serve you like me!
Alexander

@sweatyc
Copy link

sweatyc commented May 8, 2019

Thx @alejandroesteban,

I was about to use http download with Unity's WebRequest, but I guess it would require the buckets to be public, which sometime may not be the case I want...

I will give your suggestion a try first...

@NGAndersson
Copy link

Hi! Thanks to @alejandroesteban I managed to get download progress working. But I can't figure out how to make upload progress work.

I also have an issue since importing @alejandroesteban's package, where I sometimes get this error when downloading files:

NullReferenceException: Object reference not set to an instance of an object
Amazon.Runtime.Internal.UnityMainThreadDispatcher+<InvokeRequest>d__11.MoveNext () (at D:/Downloads/aws-sdk-net-master/sdk/src/Core/Amazon.Runtime/Pipeline/_unity/UnityMainThreadDispatcher.cs:215)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

It works with the official AWSS3 package.
Tested on 2018.3.0f2 and 2019.1.2f1.

@LarsIngo
Copy link

LarsIngo commented Aug 12, 2019

Would also love a fix for this!

@guilhermern
Copy link

Any updates ?

@XanNava
Copy link

XanNava commented May 31, 2020

Is there an official feature request thread on aws forum for this, maybe to up vote or just +1.

@bakhtiyar-ospanov
Copy link

Hi guys! Are there any updates on download progress callback for AWS Unity SDK (AmazonS3Client.GetObjectAsync)? or maybe someone has valid link/package for solution by @alejandroesteban (in his github project several dlls are missing, replacing them from original sdk will not work)?

@github-actions
Copy link

github-actions bot commented Jun 6, 2021

We have noticed this issue has not recieved attention in a year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 6, 2021
@guilhermern
Copy link

I think this would be a great feature for the unity sdk

@hunanniu hunanniu reopened this Aug 19, 2021
@normj
Copy link
Member

normj commented Aug 21, 2021

Since our support for Unity has moved to using the .NET Standard 2.0 version of the SDK in Unity you can use the existing WriteObjectProgressEvent to track progress.

@normj normj closed this as completed Aug 21, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@hasnainv
Copy link

@normj Could you please give us a download link to the dlls where this is fixed?
Downloading from nuget or web links from google search isn't helping.

@ashovlin
Copy link
Member

ashovlin commented Oct 28, 2021

@hasnainv We recommend using the .NET Standard 2.0 assemblies of the SDK with Unity, available at https://sdk-for-net.amazonwebservices.com/latest/v3/aws-sdk-netstandard2.0.zip

More info: https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/unity-special.html

@guiglass
Copy link

Has there been any solution to this? I am not sure if anyone here has recommended a solution yet but I am facing the same issue were other libraries support progress callbacks but AWS SDK does not include this? Or am I just missing something simple? How do I measure download progress in Unity using AWS SDK? I can't find anything, progress works fine on uploads. What am I missing???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness feature-request A feature should be added or improved. Unity
Projects
None yet
Development

No branches or pull requests