Aws-sdk-net: Is there a long-term support for the AWS/Unity integration?

Created on 7 Jun 2020  路  8Comments  路  Source: aws/aws-sdk-net

(This is a cross-post from the samples repo, since I could not get anything working in Unity based on the available docs :-/)

We have a Unity app that currently uses a native web view to upload files to S3. To speed up this, we'd love to integrate the AWS SDK into Unity and do this completely natively.

What puzzles me a bit is that there's no "official AWS package" in the Unity asset store, and I can see issues here describing major problems (like not being able to run the samples in Unity 2019). And when I tried them out, I could not even make them work, just ran into one weird exception after the other. I would consider myself as a quite experienced Unity dev.

So I am wondering if there's any kind of official (long-term) support for this integration. It won't help me if it kinda works now, but breaks later and no one cares for the numerous bugs... It is also very confusing that the link to the AWS Mobile SDK for Unity here

https://docs.aws.amazon.com/mobile-sdk/index.html

actually links to Amplify, while the other links below still refer to the Unity SDK.

The same goes for the "Download AWS SDK for Unity" download link that shows up on the "Getting Started with Cognito page" below. That link points to Amplify, but with no info whatsoever about where to get the actual SDK. This left me with the gut-feeling that the whole Unity support has been dropped with the intention to replace it by Amplify at a later point of time. Correct me if I am wrong.

image

On the same page, there is this link, which does not really point to Unity-specific info:

image

I am particularly getting nervous, because Unity itself is quite well-known for introducing breaking changes in their updates. So, including a package that is not well-maintained itself and kept up-to-date regularly imposes a pretty high upgrade risk on your app.

guidance investigating modulunity response-requested

Most helpful comment

I've been following along on this project, as the article for it was pretty recently written.

But, in general, I've been having a plethora of similar issues. Some of these issues are permissions, IAM policy based as I'm working with an external client, navigating these issues has taken time. But in general, it's been extremely challenging navigating the sea of unmarked deprecated examples.

I've followed the guidance from this article, Referencing the AWS SDK for .NET Standard 2.0 from Unity, Xamarin, or UWP, but there are so many broken changes when just pulling in the standard .NET libraries that are not covered by any of the sample AWS projects that I can find.

Two examples:

The AWSConfigs.HttpClientOption.UnityWebRequest option is gone. I have no idea what I should be reference in it's place, or whether the default HttpClient should work. I can't find any guidance on that.

The UnityLogger is gone. Per the documentation it used to just output logs into Unity. Which would have been handy. I can't get any logging working at all in my project. I found this article from 2013 which has not helped, as far as I know, Unity doesn't use the app.config or web.config files it's referring to. It also appears to be causing grief in this issue #1634. Breaking logging makes everything a lot harder, for obvious reasons. I'm resorting to using Fiddler to intercept HTTP packets to manually check the messages in them.

Some other threads/issues have suggested going back to old example projects and just taking the old AWS Unity SDK DLL's, but I can't use them either because of this issue #1612.

All 8 comments

I've been following along on this project, as the article for it was pretty recently written.

But, in general, I've been having a plethora of similar issues. Some of these issues are permissions, IAM policy based as I'm working with an external client, navigating these issues has taken time. But in general, it's been extremely challenging navigating the sea of unmarked deprecated examples.

I've followed the guidance from this article, Referencing the AWS SDK for .NET Standard 2.0 from Unity, Xamarin, or UWP, but there are so many broken changes when just pulling in the standard .NET libraries that are not covered by any of the sample AWS projects that I can find.

Two examples:

The AWSConfigs.HttpClientOption.UnityWebRequest option is gone. I have no idea what I should be reference in it's place, or whether the default HttpClient should work. I can't find any guidance on that.

The UnityLogger is gone. Per the documentation it used to just output logs into Unity. Which would have been handy. I can't get any logging working at all in my project. I found this article from 2013 which has not helped, as far as I know, Unity doesn't use the app.config or web.config files it's referring to. It also appears to be causing grief in this issue #1634. Breaking logging makes everything a lot harder, for obvious reasons. I'm resorting to using Fiddler to intercept HTTP packets to manually check the messages in them.

Some other threads/issues have suggested going back to old example projects and just taking the old AWS Unity SDK DLL's, but I can't use them either because of this issue #1612.

Since my issue hasn't received a feedback within one week, I now decided to implement S3 uploads directly via HTTP POST, without even considering the Unity SDK. Luckily, I had an implementation in place on server-side already, caring for the request signature, so porting it to Unity was easy. Works like a charm.

Hey @derwaldgeist,

As of SDK v3.5 we no longer separate Unity support from regular .NET support, if you are having trouble with this transition, please make sure you are targeting ^.NET 4.0 or ^.NET Standard 2.0 using Unity 2018.0 or later. This means that you can have full access to AWS services when using the .NET SDK with Unity, but if you would still like to use the legacy SDK for Unity, you can reference it from our archive repo.

Unity will be supported in the main SDK from here on, so you don't need to worry about deprecating packages or more structure changes outside of major version changes to the SDK as a whole. You can also reference the standard SDK guides and documentation for developing your solutions.

Let me know if that helps for now!

馃樃 馃樂

@NGL321 Thank you for updating us about the Unity support, is there any documentation of how to make it work ? Do we just download the entire aws-sdk-net and put it in our assets folder ?

Hey @alihamie,

Yes! That is one way to do it. Alternatively you could consider using a Nuget manager for Unity (such as this one). We don't officially support these, but it is a popular bridge between standard Nuget packages and Unity's asset management.

馃樃 馃樂

Hi @NGL321 ,

Just wanted to let you know that it worked great, thanks for suggesting the Nuget Manager for Unity. For anyone who wants to know, you can install the AWS packages you need using the NugetForUnity plugin. When you search for the AWS package some of them are dependent on other packages. Make sure you download the other packages first , otherwise it won't let you install the AWS package. Last tip is to make sure you put the packages folder in your .gitIgnore so you don't check in all the aws dlls into your git repo.

Hi @derwaldgeist,

Based on input from @NGL321 and @alihamie, please confirm if we could close this issue.

Thanks,
Ashish

Ok, closing this, since the question has been answered. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mihafreenode picture mihafreenode  路  4Comments

haswalt picture haswalt  路  5Comments

akatz0813 picture akatz0813  路  4Comments

Rodrigo-Andrade picture Rodrigo-Andrade  路  3Comments

ShahriatHossain picture ShahriatHossain  路  4Comments