Special considerations for Unity support - Amazon SDK for .NET
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Special considerations for Unity support

When using the Amazon SDK for .NET and .NET Standard 2.0 for your Unity application, your application must reference the Amazon SDK for .NET assemblies (DLL files) directly rather than using NuGet. Given this requirement, the following are important actions you will need to perform.

  • If you're using IL2CPP to build your Unity project, you must add a link.xml file to your Asset folder to prevent code stripping. The link.xml file must list all of the AWSSDK assemblies you are using, and each must include the preserve="all" attribute. The following snippet shows an example of this file.

    <linker> <assembly fullname="AWSSDK.Core" preserve="all"/> <assembly fullname="AWSSDK.DynamoDBv2" preserve="all"/> <assembly fullname="AWSSDK.Lambda" preserve="all"/> </linker>
Note

To read interesting background information related to this requirement, see the article at https://amazonaws-china.com/blogs/developer/referencing-the-aws-sdk-for-net-standard-2-0-from-unity-xamarin-or-uwp/.

In addition to these special considerations, see What's changed for version 3.5 for information about migrating your Unity application to version 3.5 of the Amazon SDK for .NET.