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

Readme Link to learn more about unity implementation gives 404 error #1684

Closed
SeanPSmith opened this issue Aug 23, 2020 · 10 comments
Closed

Comments

@SeanPSmith
Copy link

https://github.com/aws/aws-sdk-net/blob/master/Unity.README.md

Doesn't exist.

@ashishdhingra ashishdhingra added bug This issue is a bug. documentation This is a problem with documentation. module/unity labels Aug 24, 2020
@ashishdhingra
Copy link
Contributor

Link under https://github.com/aws/aws-sdk-net/#unity-support is broken.

@ashishdhingra ashishdhingra self-assigned this Aug 24, 2020
@squidbot
Copy link

squidbot commented Aug 28, 2020

Unity.README.md disappeared in this commit 8473ada. However, the AWS SDK for Unity is deprecated and projects using Unity 2018.1 or later should use the .NET Standard 2.0 release of the AWS SDK for .NET. The deprecated library can be found here: https://github.com/aws/aws-sdk-unity-net, and has limited features.

I would suggest that the README.md be updated to reflect the information found in this blog post https://aws.amazon.com/blogs/developer/referencing-the-aws-sdk-for-net-standard-2-0-from-unity-xamarin-or-uwp/ which details where to find the prebuilt binaries and how to get Unity working correctly with the AWS .NET SDK when il2cpp is used. Also, have a link to the deprecated repository for people using older versions of Unity.

@ashishdhingra ashishdhingra added the p1 This is a high priority issue label Sep 8, 2020
@jwvanderbeck
Copy link

What IS the right way to get up and running now? Even with the .NET Standard 2.0 release, the sample S3 code doesn't compile.

@NGL321 NGL321 added A and removed module/unity labels Sep 9, 2020
@brmenchl
Copy link

After following the recommendation linked by @squidbot above, I'm getting an error

Assembly 'Assets/OurAssets/AWS/AWSSDK.Core.dll' will not be loaded due to errors: Unable to resolve reference 'Microsoft.Bcl.AsyncInterfaces'. Is the assembly missing or incompatible with the current platform?

I copied the AWSSDK.Lambda and AWSSDK.Core dlls into the project and updated link.xml accordingly. Is there a place I can find Microsoft.Bcl.AsyncInterfaces?

@squidbot
Copy link

squidbot commented Sep 15, 2020

As it happens I'm writing up a new guide that includes these details. Here's my notes on integrating the AWS .Net SDK in to Unity. These are just notes, so it may be a little disorganized, but it should get you on the right track. In this case, I'm just adding AWSSDK.Core and AWSSDK.CognitoIdentityProvider. I do have this up and running in Unity 2020.1.3f1. The blog post I refer to is https://aws.amazon.com/blogs/developer/referencing-the-aws-sdk-for-net-standard-2-0-from-unity-xamarin-or-uwp/

[Begin Notes]
Downloaded SDK from http://sdk-for-net.amazonwebservices.com/latest/v3/aws-sdk-netstandard2.0.zip
Created Plugins folder in Assets
Selected .NET Standard 2.0 in the Project... Player settings
In my case, I’m not going to build with IL2CPP, but if I did you need to use the xml file from the blog post to prevent the assemblies from getting stripped you can include that
Added to the new plugins folder

  • AWSSDK.Core.dll
  • AWSSDK.CognitoIdentiyProvider.dll

You’ll see errors about the assemblies not loading due to a missing reference to Microsoft.Bcl.AsyncInterfaces. You need to get these from NuGet. This page https://docs.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017#add-packages-from-nuget-to-a-unity-project discusses how to add the dll’s from NuGet correctly. I made this a little easier... problem is the VisualStudio project is constantly resaved, so you lose any nuget stuff you set up in the project, so you need to grab from nuget and then copy to the plugins folder.

  • In Visual Studio, right click the solution, go to “Manage NuGet Pacakges for Solution...”
  • Click the Browse tab in the NuGet tool
  • Search for Microsoft.Bcl.AsyncInterfaces, click on it
  • Select Project then Install
  • In file explorer, navigate to your project and find the Packages folder
  • 3 packages were installed
    • Microsoft.Bcl.AsyncInterfaces.dll
    • System.Runtime.CompilerServices.Unsafe.dll
    • System.Threading.Tasks.Extensions.dll
  • Dive in to each package, look for lib/netstandard2.0 and copy the dll from there by dragging it in to the Unity editor in plugins

At this point all dependencies should be resolved. Note there are some easier ways to use NuGet with Unity, including a package here that looks pretty sweet but I didn’t try it: https://github.com/GlitchEnzo/NuGetForUnity
Once you’ve moved over the dll’s you can delete the packages folder to clean things up.

@brmenchl
Copy link

Thank you! I almost got there myself, thank you for filling in the gaps.

@kawzar
Copy link

kawzar commented Sep 18, 2020

As it happens I'm writing up a new guide that includes these details. Here's my notes on integrating the AWS .Net SDK in to Unity. These are just notes, so it may be a little disorganized, but it should get you on the right track. In this case, I'm just adding AWSSDK.Core and AWSSDK.CognitoIdentityProvider. I do have this up and running in Unity 2020.1.3f1. The blog post I refer to is https://aws.amazon.com/blogs/developer/referencing-the-aws-sdk-for-net-standard-2-0-from-unity-xamarin-or-uwp/

[Begin Notes]
Downloaded SDK from http://sdk-for-net.amazonwebservices.com/latest/v3/aws-sdk-netstandard2.0.zip
Created Plugins folder in Assets
Selected .NET Standard 2.0 in the Project... Player settings
In my case, I’m not going to build with IL2CPP, but if I did you need to use the xml file from the blog post to prevent the assemblies from getting stripped you can include that
Added to the new plugins folder

  • AWSSDK.Core.dll
  • AWSSDK.CognitoIdentiyProvider.dll

You’ll see errors about the assemblies not loading due to a missing reference to Microsoft.Bcl.AsyncInterfaces. You need to get these from NuGet. This page https://docs.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017#add-packages-from-nuget-to-a-unity-project discusses how to add the dll’s from NuGet correctly. I made this a little easier... problem is the VisualStudio project is constantly resaved, so you lose any nuget stuff you set up in the project, so you need to grab from nuget and then copy to the plugins folder.

  • In Visual Studio, right click the solution, go to “Manage NuGet Pacakges for Solution...”

  • Click the Browse tab in the NuGet tool

  • Search for Microsoft.Bcl.AsyncInterfaces, click on it

  • Select Project then Install

  • In file explorer, navigate to your project and find the Packages folder

  • 3 packages were installed

    • Microsoft.Bcl.AsyncInterfaces.dll
    • System.Runtime.CompilerServices.Unsafe.dll
    • System.Threading.Tasks.Extensions.dll
  • Dive in to each package, look for lib/netstandard2.0 and copy the dll from there by dragging it in to the Unity editor in plugins

At this point all dependencies should be resolved. Note there are some easier ways to use NuGet with Unity, including a package here that looks pretty sweet but I didn’t try it: https://github.com/GlitchEnzo/NuGetForUnity
Once you’ve moved over the dll’s you can delete the packages folder to clean things up.

THANKS, THANKS, THANK YOU VERY MUCH.
I've been dealing with this references issue for a couple of days. I was able to make them work following this workaround. Really appreciated.

@ashishdhingra ashishdhingra removed their assignment Sep 29, 2020
@ashishdhingra ashishdhingra removed the p1 This is a high priority issue label Oct 2, 2020
@hunanniu hunanniu added queued and removed documentation This is a problem with documentation. labels Oct 7, 2020
@AdamBebko
Copy link

For other users, I wasn't able to de-zip the nugget packages for some reason. What I did was in my unity solution in rider IDE, I installed the packages from Nuget (Tools > Nuget > Show Nuget Tool Window). I installed them. They go into UnityProjectRoot/Packages folder.

This doesn't actually work, but it gives you access to the appropriate DLLs. You go into the folders in finder and look for the dotnetstandard2.0 versions of the dlls, and drag these into the plugins folder.

Then you delete the folders that were added into the packages folder. Be careful not to delete the package lock or manifest file!

Note: I got an error that I already had System.Runtime.CompilerServices.Unsafe.dll. So I just deleted it afterwards.

@Paul-B-AWS
Copy link
Contributor

The README for aws/aws-sdk-net has been updated to handle changes to Unity support.

  • Added links to the latest developer guide with information about using Unity with V3.5 and later of the SDK.
    If enhancements, clarifications, etc., are needed in the developer guide, please click the feedback link in the appropriate developer-guide webpage and then provide details.
  • Updated the link to point to the repo that contains the legacy information and code for Unity support.

The following is a direct link to the Unity content in the README: https://github.com/aws/aws-sdk-net#unity-support

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants