Code Monkey home page Code Monkey logo

amazon-gamelift-unity's Issues

GameLift Server SDK Error in Built Unity 2019.4.4f1 Player With Managed Stripping Turned On

Hi,

I'm not sure if this is the right place, but I'll give it a shot.

I cloned this repository and ran build.bat. Then, I copied the DLLs generated over to my project in Unity 2019.4.4f1. I have a MonoBehavior in my scene with the following:

private void Start()
{
    GenericOutcome outcome = GameLiftServerAPI.InitSDK();
    if (!outcome.Success)
    {
        Debug.LogError($"Failed to initialize server SDK {outcome.Error}");
        return;
    }
    var logParameters = new LogParameters(new List<string> {Application.consoleLogPath});
    var processParameters = new ProcessParameters(OnStartGameSession, OnProcessTerminate, OnHealthCheck,
                                                  m_ServerPort, logParameters);
    GameLiftServerAPI.ProcessReady(processParameters);
    Debug.Log("GameLift server process ready");
}

Now, this works in the editor. It connects to my local game lift server (the .jar provided in the SDK download from the main Amazon GameLift page).

However, as soon as I build the project for Windows Stadalone x64 (with Mono backend), I receive an error from log4net, which I know is one of the dependencies after calling the InitSDK() function:

ArgumentOutOfRangeException: Parameter: defaultRepositoryType, Value: [log4net.Repository.Hierarchy.Hierarchy] out of range. Argument must implement the ILoggerRepository interface
Parameter name: defaultRepositoryType
Actual value was log4net.Repository.Hierarchy.Hierarchy.

The error happens twice and the Start() function exits so nothing is set up properly. Based on the fact it works in the editor, I think that it probably has to do with a .NET DLL not being copied over into the build properly. See: https://stackoverflow.com/questions/58099681/unitypython-working-on-editor-but-not-on-build for an example of this happening with another plugin.

Even if I modify the Game Server SDK project and remove all logging calls, I get another error:

DescriptorValidationException: com.amazon.whitewater.auxproxy.pbuffer.BackfillMatchmakingRequest.players: Property Players not found in Com.Amazon.Whitewater.Auxproxy.Pbuffer.BackfillMatchmakingRequest.

So something in the final built setup is definitely malformed or missing.

Thanks!

IL2CPP Android Error

I followed the steps to test this sample project and everything works fine on desktop builds. The problems starts after testing the sample on android player.

At first I was having a similar problem to this issue, my log was:

NotSupportedException: System.Configuration.ConfigurationManager::get_AppSettings
02-18 11:54:25.026 27935  7064 E Unity   :   at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.026 27935  7064 E Unity   :   at Amazon.AWSConfigs.GetConfig (System.String name) [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.026 27935  7064 E Unity   :   at Amazon.AWSConfigs..cctor () [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.026 27935  7064 E Unity   :   at Amazon.Runtime.Internal.Util.TraceSourceUtil.GetTraceSourceWithListeners (System.String name, System.Diagnostics.SourceLevels sourceLevels) [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.026 27935  7064 E Unity   :   at Amazon.Runtime.Internal.Util.Logger..ctor (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.026 27935  7064 E Unity   :   at Amazon.Runtime.Internal.Util.Logger.GetLogger (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.026 27935  7064 E Unity   :   at Amazon.Runtime.CredentialManagement.SharedCredentialsFile..ctor () [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.026 27935  7064 E Unity   :   at Credentials.MigrateProfile () [0x00000] in <00000000000000000000000000000
02-18 11:54:25.028 27935  7072 E Unity   : NullReferenceException: Object reference not set to an instance of an object.
02-18 11:54:25.028 27935  7072 E Unity   :   at GameLiftClient.Finalize () [0x00000] in <00000000000000000000000000000000>:0
02-18 11:54:25.028 27935  7072 E Unity   : System.UnhandledExceptionEventHandler:Invoke(Object, UnhandledExceptionEventArgs)
02-18 11:54:25.028 27935  7072 E Unity   :
02-18 11:54:25.028 27935  7072 E Unity   : (Filename: currently not available on il2cpp Line: -1)

So I replaced the current AWS SDK Core for the NetStandard 2.0 one.

I also added a link.xml file to the project:

<linker>
    <!--  if you are using AWSConfigs.HttpClient.UnityWebRequest option -->
    <assembly fullname="UnityEngine">
        <type fullname="UnityEngine.Networking.UnityWebRequest" preserve="all"/>
        <type fullname="UnityEngine.Networking.UploadHandlerRaw" preserve="all"/>
        <type fullname="UnityEngine.Networking.UploadHandler" preserve="all"/>
        <type fullname="UnityEngine.Networking.DownloadHandler" preserve="all"/>
        <type fullname="UnityEngine.Networking.DownloadHandlerBuffer" preserve="all"/>
    </assembly>

    <assembly fullname="mscorlib">
        <namespace fullname="System.Security.Cryptography" preserve="all"/>
    </assembly>
    <assembly fullname="System">
        <namespace fullname="System.Security.Cryptography" preserve="all"/>
        <type fullname="System.ComponentModel.TypeConverter" preserve="all"/>
        <type fullname="System.ComponentModel.ArrayConverter" preserve="all"/>
        <type fullname="System.ComponentModel.BaseNumberConverter" preserve="all"/>
        <type fullname="System.ComponentModel.BooleanConverter" preserve="all"/>
        <type fullname="System.ComponentModel.ByteConverter" preserve="all"/>
        <type fullname="System.ComponentModel.CharConverter" preserve="all"/>
        <type fullname="System.ComponentModel.CollectionConverter" preserve="all"/>
        <type fullname="System.ComponentModel.ComponentConverter" preserve="all"/>
        <type fullname="System.ComponentModel.CultureInfoConverter" preserve="all"/>
        <type fullname="System.ComponentModel.DateTimeConverter" preserve="all"/>
        <type fullname="System.ComponentModel.DecimalConverter" preserve="all"/>
        <type fullname="System.ComponentModel.DoubleConverter" preserve="all"/>
        <type fullname="System.ComponentModel.EnumConverter" preserve="all"/>
        <type fullname="System.ComponentModel.ExpandableObjectConverter" preserve="all"/>
        <type fullname="System.ComponentModel.Int16Converter" preserve="all"/>
        <type fullname="System.ComponentModel.Int32Converter" preserve="all"/>
        <type fullname="System.ComponentModel.Int64Converter" preserve="all"/>
        <type fullname="System.ComponentModel.NullableConverter" preserve="all"/>
        <type fullname="System.ComponentModel.SByteConverter" preserve="all"/>
        <type fullname="System.ComponentModel.SingleConverter" preserve="all"/>
        <type fullname="System.ComponentModel.StringConverter" preserve="all"/>
        <type fullname="System.ComponentModel.TimeSpanConverter" preserve="all"/>
        <type fullname="System.ComponentModel.UInt16Converter" preserve="all"/>
        <type fullname="System.ComponentModel.UInt32Converter" preserve="all"/>
        <type fullname="System.ComponentModel.UInt64Converter" preserve="all"/>
    </assembly>
    <assembly fullname="Google.Protobuf" preserve="all"/>
    <assembly fullname="GameLiftRealtimeClientSdkNet45" preserve="all" />
    <assembly fullname="SuperSocket.ClientEngine" preserve="all" />
    <assembly fullname="WebSocket4Net" preserve="all" />

    <assembly fullname="AWSSDK.Core" preserve="all">
        <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
    </assembly>
    <assembly fullname="AWSSDK.CognitoIdentity" preserve="all">
        <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
    </assembly>
    <assembly fullname="AWSSDK.SecurityToken" preserve="all">
        <namespace fullname="Amazon.Util.Internal.PlatformServices" preserve="all"/>
    </assembly>

    <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="Newtonsoft.Json" preserve="all"/>
    <assembly fullname="websocket-sharp" preserve="all"/>

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

The other modifications were to hard code credentials and alias so that the android player automatically tries to connect to the GameLift server. I tested it on unity editor both on windows and android build targets, on a windows build using IL2CPP and everything works fine, the android player with IL2CPP is the only one that has problems.

If you are testing this make sure to change attributes aliasId, profileNameon GameLiftClient class, also change accessKey and privateKey params on the new Amazon.Runtime.BasicAWSCredentials("my accessKey", "my secretKey"); call, line 380 on GameLift.cs file

This is the log from the android player, the problem seems to be on the NetworkClient.Connect() method:
https://i.imgur.com/KP0FIm6.png

02-18 22:42:54.597 15820 26082 I Unity   : :) GAMELOGIC AWAKE
02-18 22:42:54.597 15820 26082 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
02-18 22:42:54.597 15820 26082 I Unity   : UnityEngine.Logger:Log(LogType, Object)
02-18 22:42:54.597 15820 26082 I Unity   : UnityEngine.Debug:Log(Object)
02-18 22:42:54.597 15820 26082 I Unity   : GameLogic:Awake()
02-18 22:42:54.597 15820 26082 I Unity   :
02-18 22:42:54.597 15820 26082 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-18 22:42:54.597 15820 26082 I Unity   :
02-18 22:42:54.599 15820 26082 I Unity   : :) GAMELIFT AWAKE
02-18 22:42:54.599 15820 26082 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
02-18 22:42:54.599 15820 26082 I Unity   : UnityEngine.Logger:Log(LogType, Object)
02-18 22:42:54.599 15820 26082 I Unity   : UnityEngine.Debug:Log(Object)
02-18 22:42:54.599 15820 26082 I Unity   : GameLift:Awake()
02-18 22:42:54.599 15820 26082 I Unity   :
02-18 22:42:54.599 15820 26082 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-18 22:42:54.599 15820 26082 I Unity   :
02-18 22:42:54.602 15820 26082 I Unity   : :) I AM CLIENT
02-18 22:42:54.602 15820 26082 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
02-18 22:42:54.602 15820 26082 I Unity   : UnityEngine.Logger:Log(LogType, Object)
02-18 22:42:54.602 15820 26082 I Unity   : UnityEngine.Debug:Log(Object)
02-18 22:42:54.602 15820 26082 I Unity   : GameLift:Awake()
02-18 22:42:54.602 15820 26082 I Unity   :
02-18 22:42:54.602 15820 26082 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-18 22:42:54.602 15820 26082 I Unity   :
02-18 22:42:54.667 15820 26082 D Unity   : Unable to lookup library path for 'Crypt32', native render plugin support disabled.
02-18 22:42:54.668 15820 26082 E Unity   : Unable to find Crypt32
02-18 22:42:54.682 15820 26082 E Unity   : AmazonClientException: The encrypted store is not available.  This may be due to use of a non-Windows operating system or Windows Nano Server, or the current user account may not have its profile loaded.
02-18 22:42:54.682 15820 26082 E Unity   :   at Amazon.Util.Internal.SettingsManager.EnsureAvailable () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.682 15820 26082 E Unity   :   at Amazon.Util.Internal.SettingsManager..ctor (System.String settingsType) [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.682 15820 26082 E Unity   :   at Amazon.Util.Internal.NamedSettingsManager..ctor (System.String settingsType) [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.682 15820 26082 E Unity   :   at Amazon.Runtime.CredentialManagement.NetSDKCredentialsFile..ctor () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.682 15820 26082 E Unity   :   at Credentials.MigrateProfile () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.682 15820 26082 E Unity   :   at Credentials.Install () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.682 15820 26082 E Unity   :   at GameLiftClient..ctor (GameLift _gl) [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.682 15820 26082 E Unity   :   at GameLift.Awake () [0x00000] in <00000000000000000000000000000
02-18 22:42:54.685 15820 26227 E Unity   : NullReferenceException: Object reference not set to an instance of an object.
02-18 22:42:54.685 15820 26227 E Unity   :   at GameLiftClient.DisposeGameLiftClient () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.685 15820 26227 E Unity   :   at GameLiftClient.Finalize () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.685 15820 26227 E Unity   : UnityEngine.DebugLogHandler:LogException(Exception, Object)
02-18 22:42:54.685 15820 26227 E Unity   : UnityEngine.Logger:LogException(Exception, Object)
02-18 22:42:54.685 15820 26227 E Unity   : UnityEngine.Debug:LogException(Exception)
02-18 22:42:54.685 15820 26227 E Unity   : UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)
02-18 22:42:54.685 15820 26227 E Unity   :
02-18 22:42:54.685 15820 26227 E Unity   : (Filename: currently not available on il2cpp Line: -1)
02-18 22:42:54.685 15820 26227 E Unity   :
02-18 22:42:54.718 15820 26082 D Unity   : Sensor :        Accelerometer ( 1) ; 0.002394 / 0.00s ; LSM6DSO Acceleration Sensor / STM
02-18 22:42:54.737 15820 26082 D Unity   : Choreographer available: Enabling VSYNC timing
02-18 22:42:54.742 15820 26082 I Unity   : :) GAMELOGIC START
02-18 22:42:54.742 15820 26082 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
02-18 22:42:54.742 15820 26082 I Unity   : UnityEngine.Logger:Log(LogType, Object)
02-18 22:42:54.742 15820 26082 I Unity   : UnityEngine.Debug:Log(Object)
02-18 22:42:54.742 15820 26082 I Unity   : GameLogic:Start()
02-18 22:42:54.742 15820 26082 I Unity   :
02-18 22:42:54.742 15820 26082 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-18 22:42:54.742 15820 26082 I Unity   :
02-18 22:42:54.753 15820 26082 I Unity   : CLIENT 0: Frame: 0 :) CONNECT TO LOCAL SERVER FAILED: PROBABLY NO LOCAL SERVER RUNNING, TRYING GAMELIFT
02-18 22:42:54.753 15820 26082 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
02-18 22:42:54.753 15820 26082 I Unity   : UnityEngine.Logger:Log(LogType, Object)
02-18 22:42:54.753 15820 26082 I Unity   : UnityEngine.Debug:Log(Object)
02-18 22:42:54.753 15820 26082 I Unity   : Log:WriteLine(String)
02-18 22:42:54.753 15820 26082 I Unity   : NetworkClient:TryConnect(String, Int32, String)
02-18 22:42:54.753 15820 26082 I Unity   : NetworkClient:Connect()
02-18 22:42:54.753 15820 26082 I Unity   : NetworkClient:.ctor(GameLogic)
02-18 22:42:54.753 15820 26082 I Unity   : GameLogic:Start()
02-18 22:42:54.753 15820 26082 I Unity   :
02-18 22:42:54.753 15820 26082 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
02-18 22:42:54.753 15820 26082 I Unity   :
02-18 22:42:54.754 15820 26082 E Unity   : NullReferenceException: Object reference not set to an instance of an object.
02-18 22:42:54.754 15820 26082 E Unity   :   at GameLift.GetConnectionInfo (System.String& ip, System.Int32& port, System.String& auth) [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.754 15820 26082 E Unity   :   at NetworkClient.Connect () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.754 15820 26082 E Unity   :   at NetworkClient..ctor (GameLogic _gl) [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.754 15820 26082 E Unity   :   at GameLogic.Start () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.754 15820 26082 E Unity   :
02-18 22:42:54.754 15820 26082 E Unity   : (Filename: currently not available on il2cpp Line: -1)
02-18 22:42:54.754 15820 26082 E Unity   :
02-18 22:42:54.758 15820 26082 E Unity   : NullReferenceException: Object reference not set to an instance of an object.
02-18 22:42:54.758 15820 26082 E Unity   :   at GameLogic.get_Authoritative () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.758 15820 26082 E Unity   :   at GameLogic.Attract () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.758 15820 26082 E Unity   :   at GameLogic.Update () [0x00000] in <00000000000000000000000000000000>:0
02-18 22:42:54.758 15820 26082 E Unity   :
02-18 22:42:54.758 15820 26082 E Unity   : (Filename: currently not available on il2cpp Line: -1)

Repo with my changes: https://github.com/Dankann/amazon-unity-sample-android

Obs: Error Unable to find Crypt32 was already reported here

Project Setup

Hello,
Sorry for the silly question, but after cloning the project I'm getting error.
The type or namespace name 'Amazon' could not be found (are you missing a using directive or an assembly reference?)
I'm using Unity 2018.4.23f, Do I have import AWS SDK packages. Also, I'm trying to build for Android. Gamelift support Android builds?

Problem when trying to connect as a client to Gamelift.

Hi,

I'm new to Gamelift, trying to make this game run to learn more about Game Tech on AWS.

I was able to build the code and deploy a fleet, but when running the rc.bat command with the alias flag and the alias name, Unity start and connect to a local server with 0 connections.

I'm running Windows 10 (64 bits) and have same problem with Unity versions 2017.4.36f1 LTS and the last version 2019.3.1f1, both installed through the Unity Hub version 2.2.2

Have attached some screenshots that maybe can be useful.

Thank you very much for your attention and sorry for the inconvenience.

Best Regards

screen1

screen2

screen3

screen4

Error Deploying

Hi,

First, thanks for the sample. Following step-by-step, I ran into an error. The game runs locally (rs,rc,rc,rc) however it craps out when deploying. I tried recreating the user several times. I still get the same error. Not sure what's going on. Looks like it's calling deploytool.exe. Not sure why it's not happy. Thanks!

C:\Users\rosssalas\src\github\amazon-gamelift-unity\Build>deploy.bat 25.0 PLEASE WAIT. DEPLOYMENT PROCESS TAKES A FEW MINUTES. Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials() at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentials() at Amazon.Runtime.Internal.CredentialsRetriever.PreInvoke(IExecutionContext executionContext) at Amazon.Runtime.Internal.CredentialsRetriever.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.RetryHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.EndpointResolver.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.Marshaller.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.MetricsHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.RuntimePipeline.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.AmazonServiceClient.Invoke[TRequest,TResponse](TRequest request, IMarshaller`2 marshaller, ResponseUnmarshaller unmarshaller) at Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.GetUser(GetUserRequest request) at Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.GetUser() at DeployTool.Program.GetAWSNum() at DeployTool.Program.d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DeployTool.Program.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DeployTool.Program.Main(String[] args) C:\Users\rosssalas\src\github\amazon-gamelift-unity\Build>dir Volume in drive C is Local Volume Serial Number is 4A0A-D470 Directory of C:\Users\rosssalas\src\github\amazon-gamelift-unity\Build 10/14/2020 08:25 PM

. 10/14/2020 08:25 PM .. 10/14/2020 08:25 PM 1,171 build.bat 10/14/2020 08:25 PM 4,561 buildconfig.bat 10/14/2020 08:25 PM 3,108 builddeploytool.bat 10/14/2020 08:25 PM 12,824 buildsdk.bat 10/14/2020 08:25 PM 2,833 clean.bat 10/14/2020 08:25 PM 2,350 delconfig.bat 10/14/2020 08:25 PM 1,683 deploy.bat 10/14/2020 08:25 PM 2,071 distro.bat 10/14/2020 08:25 PM FixSdk 10/14/2020 08:25 PM 2,062 loadconfig.bat 10/14/2020 08:25 PM 1,277 profile.bat 10/14/2020 08:25 PM 1,569 rc.bat 10/14/2020 08:25 PM 845 rs.bat 10/14/2020 08:25 PM 3,239 saveconfig.bat 13 File(s) 39,593 bytes 3 Dir(s) 121,293,103,104 bytes free

Failed to build

I try to build but seems like it failed at the getting Gamelift SDK stage.

C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build>build
Root directory: C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity
BUILDING SDK
The system cannot find the path specified.
Checking for updates from https://api.nuget.org/v3/index.json [https://api.nuget.org/v3/index.json].
  CACHE https://api.nuget.org/v3/registration5-gz-semver2/nuget.commandline/index.json
Currently running NuGet.exe 5.8.1.
NuGet.exe is up to date.
Update successful.
The system cannot find the path specified.
The system cannot find the path specified.
Running VCVARS32
[DEBUG:VsDevCmd] Writing pre-initialization environment to C:\Users\cs\AppData\Local\Temp\dd_vsdevcmd16_preinit_env.log
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.5.1
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[DEBUG:VsDevCmd.bat] Sending telemetry
[DEBUG:VsDevCmd] Writing post-execution environment to C:\Users\cs\AppData\Local\Temp\dd_vsdevcmd16_env.log
'C:\Users\cs\Documents\Unity' is not recognized as an internal or external command,
operable program or batch file.
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\SDK\GameLift_12_22_2020\GameLift-SDK-Release-4.0.0\GameLift-CSharp-ServerSDK-4.0.0\GameLiftServerSDKNet45.sln
ERROR: THE GAMELIFT SDK BUILD FAILED

C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build>build
Root directory: C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity
BUILDING SDK
The system cannot find the path specified.
Checking for updates from https://api.nuget.org/v3/index.json [https://api.nuget.org/v3/index.json].
  CACHE https://api.nuget.org/v3/registration5-gz-semver2/nuget.commandline/index.json
Currently running NuGet.exe 5.8.1.
NuGet.exe is up to date.
Update successful.
The system cannot find the path specified.
The system cannot find the path specified.
Running VCVARS32
[DEBUG:VsDevCmd] Writing pre-initialization environment to C:\Users\cs\AppData\Local\Temp\dd_vsdevcmd16_preinit_env.log
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.5.1
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[DEBUG:VsDevCmd.bat] Sending telemetry
[DEBUG:VsDevCmd] Writing post-execution environment to C:\Users\cs\AppData\Local\Temp\dd_vsdevcmd16_env.log
FIXING SDK BUGS
C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build\FixSdk
'dotnet' is not recognized as an internal or external command,
operable program or batch file.
'dotnet' is not recognized as an internal or external command,
operable program or batch file.
'C:\Users\cs\Documents\Unity' is not recognized as an internal or external command,
operable program or batch file.
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\SDK\GameLift_\GameLift-SDK-Release-4.0.2\GameLift-CSharp-ServerSDK-4.0.2\GameLiftServerSDKNet45.sln
ERROR: THE GAMELIFT SDK BUILD FAILED

C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build>build
Root directory: C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity
BUILDING SDK
The system cannot find the path specified.
Checking for updates from https://api.nuget.org/v3/index.json [https://api.nuget.org/v3/index.json].
  CACHE https://api.nuget.org/v3/registration5-gz-semver2/nuget.commandline/index.json
Currently running NuGet.exe 5.8.1.
NuGet.exe is up to date.
Update successful.
Feeds used:
  C:\Users\cs\.nuget\packages\
  https://api.nuget.org/v3/index.json



Attempting to gather dependency information for package 'AWSSDK.Gamelift.3.3.106.52' with respect to project 'C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build', targeting 'Any,Version=v0.0'
Gathering dependency information took 534 ms
Attempting to resolve dependencies for package 'AWSSDK.Gamelift.3.3.106.52' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'AWSSDK.Gamelift.3.3.106.52'
Resolved actions to install package 'AWSSDK.Gamelift.3.3.106.52'
Retrieving package 'AWSSDK.Core 3.3.107.24' from 'C:\Users\cs\.nuget\packages\'.
Retrieving package 'AWSSDK.Gamelift 3.3.106.52' from 'C:\Users\cs\.nuget\packages\'.
Adding package 'AWSSDK.Core.3.3.107.24' to folder 'C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build'
Added package 'AWSSDK.Core.3.3.107.24' to folder 'C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build'
Successfully installed 'AWSSDK.Core 3.3.107.24' to C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build
Adding package 'AWSSDK.GameLift.3.3.106.52' to folder 'C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build'
Added package 'AWSSDK.GameLift.3.3.106.52' to folder 'C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build'
Successfully installed 'AWSSDK.Gamelift 3.3.106.52' to C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\Build
Executing nuget actions took 925 ms
The system cannot find the path specified.
The system cannot find the path specified.
Running VCVARS32
[DEBUG:VsDevCmd] Writing pre-initialization environment to C:\Users\cs\AppData\Local\Temp\dd_vsdevcmd16_preinit_env.log
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.5.1
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[DEBUG:VsDevCmd.bat] Sending telemetry
[DEBUG:VsDevCmd] Writing post-execution environment to C:\Users\cs\AppData\Local\Temp\dd_vsdevcmd16_env.log
'C:\Users\cs\Documents\Unity' is not recognized as an internal or external command,
operable program or batch file.
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: C:\Users\cs\Documents\Unity Lab\amazon-gamelift-unity\SDK\GameLift_04_16_2020\GameLift-SDK-Release-4.0.0\GameLift-CSharp-ServerSDK-4.0.0\GameLiftServerSDKNet45.sln
ERROR: THE GAMELIFT SDK BUILD FAILED

GameLift Script Performance

Hi Al,

Needed to contact you but only found this way to do it.
I'm using this gamelift example on my own unity game.
At the moment, the gamelift code starts running when you press a button in a menu. Problem is, creating a game session or joining one pretty much freezes the main thread for a couple of seconds which makes the menu feel quite laggy. I tried modifying the gamelift script and turn it into a coroutine but some methods still freeze the game completely. Using the unity job system or threads wouldn't(?) work since the code calls and it's called from gamelogic (main thread). Do you have any advice to solve this issue?. Ideally, I want to do other stuff while the game looks for a match without having hiccups or huge drops in frames.

Regards

Automatic Build & Deploy scripts are not working with recent Unity versions

Hello there!
I'm new on the entire Gamelift technology, and I'm trying to learn how to use it with Unity. First of all, thanks for that wonderful project with a great step-by-step guide.

In your tutorial, it seems that the buildconfig.bat script is no longer working with the version on Unity I am currently using: 2019.1.4f1. Your script currently does the following when looking for the Unity.exe file in order to build the project:

IF EXIST "%ProgramFiles(x86)%\Unity\Editor\Unity.exe"
SET UNITYEXE="%ProgramFiles(x86)%\Unity\Editor\Unity.exe"
IF EXIST "%ProgramFiles%\Unity\Editor\Unity.exe"
SET UNITYEXE="%ProgramFiles%\Unity\Editor\Unity.exe"

but my Unity EXE file is located at %ProgramFiles%\Unity\Hub\Editor\2019.1.4f1\Editor\Unity.exe. That being said, I managed to make it work so far by change that line of code.

However, when I'm trying to deploy a fleet on Gamelift, the script deploy.bat also encounters an error when trying to take the build result from the precedent step. That time, it's the --root-path %ABS_ROOT%\Output\Server\Image argument that causes a problem when executing the DeployTool.exe. Since this repertory doesn't exist in the 2019.1.4f1 project folder architecture, I couldn't manage to find what tweak I could do to make the script work because I don't know what the program wants to do with that folder.

Thanks a lot!
-Élie

Failed to Build (System.Memory.dll not allowed to be included or could not be found)

Failed to Build it seems like (System.Memory.dll not allowed to be included or could not be found)

ArgumentException: The Assembly System.Runtime.CompilerServices.Unsafe is referenced by System.Memory ('Assets/Plugins/System.Memory.dll'). But the dll is not allowed to be included or could not be found.
Extracting referenced dlls failed.
Building Player failed
Component GUI Layer in Main Camera for Scene Assets/Scene/scene.unity is no longer available.
It will be removed after you edit this GameObject and save the Scene.
Failed to build player.
Exiting without the bug reporter. Application will terminate with return code 1

Full Editor.log: Editor.log

Can't work in gamelift mode

Hello, AWS gamelift Team. I am a new gamelifter to study how to use gamelift tech in my real-time fps game project. After following the doc step by step, LOCAL MODE worked, and then try connect aws gamelift server, there get stuck and detail attached.

1、My OS is Windows 10 Home Edition, it contains .net frame 4.5 yet, but when i run the build.bat, it prompt a message tell me here need .net framework 4.5 dev pack, how can i get it, i googled but no result. (pic 1)

2、So i edit the "/DeployTool/DeployTool.csproj", modify v4.5 to 4.5.1, install .net framework 4.5.1 dev pack, reset my Unity install path, cool LOCAL MODE worked.

3、I create a new IAM user, grant it the "gamelift client" and "gamelift server" permission policies, deploy gamelift to aws server, download the credentials.csv to my local machine, run rc to start Unity project, it encounter a fatal error and can't proceed any more.

fatal to start aws client

Some screen shot may give you more imformation, thank you very much!

net45notfound (pic 1)

IAM user (iam user and permissions policies)

gamelift-client
gamelift-server

credentials
alias

(for convenient test, i hard code the keys in code)

aws server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.