GameLift Server SDK NET 4.5 failing in built Unity Player


I downloaded the project for the Server SDK and built it on Visual Studio for Mac. I copied over all the DLL files to Assets/Plugins folder. In the editor, everything works well and it can connect to the Game Lift Local instance.

EDIT: The SDK does not work on Windows, Mac, or Linux built player. But below is still useful for debugging.

However, when I build for Linux Mono and create a docker image with Amazon Linux 2, several issues occur. Here is what happens when I run the binary. Which causes the SDK init to fail. If I remove all logging calls and try it, another errors happens: DescriptorValidationException: Property Players not found in Com.Amazon.Whitewater.Auxproxy.Pbuffer.BackfillMatchmakingRequest.

I’m not sure if I’m missing a dependency or what but I cannot get it to work. There seems to be a fundamental issue with the DLL setup.


Unity Version: 2020.1.0b16

One interesting thing to note is that the GameLift Server SDK works in the Unity Editor. So, it seems to be an issue in the way the DLL’s are packaged into the Unity player executable. Or, it could be that a DLL is NOT being added. See as an example of this happening.

The issue is that the SDK does not support Project Settings -> Player -> Other Settings -> Managed Stripping Level. Building with it set to ‘Disabled’ worked. However, I needed IL2CPP, which requires managed stripping, so I had to manually add a link.xml file (source: to my project directory.

    <assembly fullname="System.Reflection" preserve="all"/>
    <assembly fullname="System.Collections.Immutable" preserve="all"/>
    <assembly fullname="System.Memory" preserve="all"/>
    <assembly fullname="System.Buffers" preserve="all"/>
    <assembly fullname="System.Runtime.CompilerServices.Unsafe" preserve="all"/>
    <assembly fullname="log4net" preserve="all"/>
    <assembly fullname="GameLiftServerSDKNet45" preserve="all"/>
    <assembly fullname="Google.Protobuf" preserve="all"/>
    <assembly fullname="Newtonsoft.Json" preserve="all"/>
    <assembly fullname="websocket-sharp" preserve="all"/>

This is by far not the best solution and probably adds more than it needs, but it works, and that’s what I’m going to use for now.