Gamelift Unity Ubuntu Build Failed

0

Hi Guys,

I am trying to play around with Gamelift and I can't seemed to properly import the library to unity. I am using this example project the Creating Battle Royale Frog Game and have followed the library building properly as pointed out in the Add Amazon GameLift to a Unity Game Server Project article and in the SDK read me.

I bumped into these following error though I have imported all 9 DLL file to the Assets/Plugins folder in Unity

Assets/GameNetworkManager.cs(8,7): error CS0246: The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?)
Assets/GameNetworkManager.cs(9,7): error CS0246: The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?)
Assets/GameNetworkManager.cs(10,7): error CS0246: The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?)
Assets/GameNetworkManager.cs(11,7): error CS0246: The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?)
Assets/GameNetworkManager.cs(12,7): error CS0246: The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?)

Ubuntu Version: 18.04.5 LTS Unity Version: 2018.4.27f1 (as suggested in the repo) Unity .NET Run Time target: 4.x Mono Runtime Version: 6.12.0.90 Mono Build Target: .NET 4.5

The 9 DLLs

GameLiftServerSDKNet45.dll
Google.Protobuf.dll
log4net.dll
Newtonsoft.Json.dll
System.Buffers.dll
System.Collections.Immutable.dll
System.Memory.dll
System.Runtime.CompilerServices.Unsafe.dll
websocket-sharp.dll

I can't make it work, tried to release the DLL in both debug and release, nothin. Tried to restart Unity, nothing as well, I tried to reimport all the assets, still nothing.

I am not sure, what else I need to try from here, I think I may have bumped into a newbie problem, please help point me in the right direction.

Thanks!

asked 4 years ago315 views
4 Answers
0

So it is a newbie mistake, I though that restoring the package was enough, given my impression was all the required dependencies were already listed, turns out you need to get the AWS SDKs from Nuget.

Now I bumped into a different problem building the game

Assets/GameNetworkManager.cs(47,9): error CS0103: The name 'UnityInitializer' does not exist in the current context
Assets/GameNetworkManager.cs(131,20): error CS0117: 'AWSConfigs' does not contain a definition for 'HttpClient'
Assets/GameNetworkManager.cs(131,44): error CS0117: 'AWSConfigs' does not contain a definition for 'HttpClientOption'
Assets/GameNetworkManager.cs(158,28): error CS1503: Argument 1: cannot convert from 'Amazon.Lambda.Model.InvokeRequest' to 'string'
Assets/GameNetworkManager.cs(159,13): error CS1660: Cannot convert lambda expression to type 'string' because it is not a delegate type

I tried to use both new and the old monolithic AWSSDK from nuget, all produce the error, anyone have any clue how to solve the problem? or am I also bumped into yet another newbie problem?

Thanks!

answered 4 years ago
0

Did you ever solve this? I ran into those errors too with unityinitializer, AWSConfigs and so on.

answered 4 years ago
0

Same problem here. It looks like the tutorial is out of date, as are many of the GameLift SDK and AWS for Unity instructions. The more I dig, the more it looks like AWS has abandoned GameLift for Unity.

answered 3 years ago
0

Hi @REDACTEDUSER

We are in the process of improving our onboarding experience to Unity. We will announce on this forum as well as the release notes when that occurs.

I see that the repo that you are using is out of date, which is our fault as we should have deprecated it earlier. We will address this immediately.

The reason why you are running into the issue is because the mobile SDK for unity has been archived, and it's advised to use SDK for .NET instead.

In the meantime until our Unity onboarding experience improvement is released, could you please try following the GameLift example in https://github.com/aws-samples/aws-gamelift-and-serverless-backend-sample instead? Especially take a look at "Preliminary Setup" section in the README on how to download and build the SDKs.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions