Comments (2)
Hello, I tried to reproduce your issue, but I did not encounter it when I tried. I did log my repro steps (shown at the end of this post).
I don't know if you tried to build the project with the included build script. This automatically does some required steps, like downloading and building the GameLift SDK which is then put into the Assets\Plugins directory for use by Unity, and it also does a Unity build for both the game server and the game client. You are using a much newer version of Unity than the sample (or GameLift SDK) was created with, and Unity keeps making breaking changes, so keeping up with that can be a problem. I will list the steps you probably need to take, but include the steps I took for my own successful build as additional reference.
- Install Unity, and Visual Studio 2019 Community edition which the Unity installer includes as an option.
- Restart your computer to finish installation of Visual Studio 2019
- Run the Visual Studio 2019 installer, and make sure the .NET Desktop development workload is installed. Probably restart again.
- Clone the GitHub repository.
- Open the project in Unity using the Unity Hub to find it. (Ignore safe mode if it says anything about that, and do not try to build the player).
- Close Unity Editor.
- Run the Build\build.bat file.
- Everything should work. The result should look like this at the end.
BUILDING Server
The system cannot find the path specified.
USING "C:\Program Files\Unity\2021.1.26f1\Editor\Unity.exe" TO BUILD
BUILD COMPLETED SUCCESSFULLY. SEE C:\Users\alanmur\AppData\Local\Unity\Editor\Editor.log
BUILDING Client
The system cannot find the path specified.
USING "C:\Program Files\Unity\2021.1.26f1\Editor\Unity.exe" TO BUILD
BUILD COMPLETED SUCCESSFULLY. SEE C:\Users\alanmur\AppData\Local\Unity\Editor\Editor.log
IF you get the same error as I do in my STEP 11 below, then take the same steps (exactly) to remediate.
Then follow the rest of the instructions in the readme to deploy the server and connect using the client.
For additional reference, here are the steps that I took.
GOOD LUCK! Let me know if that helps, or if I can assist further.
-
I downloaded the same version of Unity as you are using.
-
I restarted the computer after Visual Studio 2019 Community had installed.
-
I cloned the repository into a directory on my computer.
-
I ran the Build\build.bat file in the terminal. This downloaded the GameLift Server SDK 4.0.0.
This project targets .NET Framework 4.5, which is no longer supported with a Dev Pack. -
I opened the following file in the Visual Studio 2019 that was installed.
aws-samples\amazon-gamelift-unity\SDK\GameLift_04_16_2020\GameLift-SDK-Release-4.0.0\GameLift-CSharp-ServerSDK-4.0.0\GameLiftServerSDKNet45.sln -
I chose to retarget the project to .NET 4.6.1. Visual Studio asked me to install the .NET for Desktop Visual Studio workload. (Weirdly enough this installed the .NET 4.5 targeting pack).
-
I built the GameLift SDK in Visual Studio 2019 to validate that we are successful.
-
I retargeted the GameLift SDK project BACK to 4.5, and it built now. You must already have got this far.
-
I went back to the command line and ran the Build\build.bat file.
-
buildconfig.bat couldn't find Unity. I manually set the file in buildconfig.bat by addiong this at line 86:
IF EXIST "%ProgramFiles%\Unity\2021.1.26f1\Editor\Unity.exe" SET UNITYEXE="%ProgramFiles%\Unity\2021.1.26f1\Editor\Unity.exe"
- I went back to the command line and ran the Build\build.bat file. I got this error in the Editor.log.
Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform. (C:/aws-samples/amazon-gamelift-unity/Library/PackageCache/[email protected]/Runtime/Newtonsoft.Json.dll)
Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform. (Assets/Plugins/Newtonsoft.Json.dll)
Scripts have compiler errors.
-
To fix that, I went into aws-samples\amazon-gamelift-unity\Assets\Plugins and deleted the Newtonsoft.Json.dll.meta and Newtonsoft.Json.dll files.
-
From the command line at aws-samples\amazon-gamelift-unity\Build I used
buildconfig.bat Server
to build the server (success). Capitalized S in Server is required! -
From the command line at aws-samples\amazon-gamelift-unity\Build I used
buildconfig.bat Client
to build the client (success). Capitalized C in Client is required.
The project build is complete now and you can deploy the server with the deploy.bat script according to the instructions in the readme.
from amazon-gamelift-unity.
Hi, thanks for the detailed guide, i'll try it out.
from amazon-gamelift-unity.
Related Issues (12)
- Automatic Build & Deploy scripts are not working with recent Unity versions HOT 6
- GameLift Server SDK Error in Built Unity 2019.4.4f1 Player With Managed Stripping Turned On HOT 8
- Project Setup HOT 2
- Error Deploying HOT 7
- Failed to build HOT 4
- IL2CPP Android Error HOT 4
- The "How to deploy a server to GameLift" part of the README doesn't make sense HOT 2
- "Error occurred. Message:'The specified location-constraint is not valid' when writing an object" HOT 2
- GameLift Script Performance
- Problem when trying to connect as a client to Gamelift. HOT 14
- Can't work in gamelift mode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-gamelift-unity.