Install the plugin for Unreal
This section describes the initial installation tasks to add the plugin to an Unreal Engine project. The plugin functionality is available when you have the project open in the Unreal editor.
Note
You can use the Amazon GameLift plugin with a standard version of the UE editor, but you need to use a source-built version when you package your game server build.
Before you start
Here's what you need to use the Amazon GameLift plugin for Unreal Engine:
-
Amazon GameLift plugin for Unreal Engine release package. [Download site]
. -
Microsoft Visual Studio 2019 or newer.
-
A source-built version of the Unreal Engine editor. You need a source-built version to package the server components for a multiplayer game. For more details, including additional prerequisites, see the Unreal Engine documentation:
-
Accessing Unreal Engine source code on GitHub
You'll need GitHub and Epic Games accounts. -
Building Unreal Engine from Source
tutorial.
-
-
A multiplayer game project with C++ game code. If you're working with a Blueprint project, see Unreal documentation on how to generate C++ source code for your project.
Add the plugin to your game project
Complete the following tasks to add the plugin to your game project.
Build the Amazon GameLift C++ server SDK
-
Unzip the Amazon GameLift plugin for Unreal Engine release package to extract two zip files:
amazon-gamelift-plugin-unreal-<>-sdk-<>.zip
GameLift-Cpp-ServerSDK-<>.zip.
Unzip these files.
-
Open the
GameLift-Cpp-ServerSDK-<>
folder, and then complete the following instructions for your platform: Linux or Microsoft Windows.
Linux
-
Run the following commands:
mkdir out cd out cmake -DBUILD_FOR_UNREAL=1 .. make
These commands build the
/lib/aws-cpp-sdk-gamelift-server.so
file. Copy
/lib/aws-cpp-sdk-gamelift-server.so
to theamazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameliftServer/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/
directory.
Microsoft Windows
Run the following commands:
mkdir out cd out cmake -G "Visual Studio 17 2022" -DBUILD_FOR_UNREAL=1 .. msbuild ALL_BUILD.vcxproj /p:Configuration=Release
These commands build the following binary files.
prefix\bin\aws-cpp-sdk-gamelift-server.dll
prefix\lib\aws-cpp-sdk-gamelift-server.lib
Copy the files to the
amazon-gamelift-plugin-unreal\GameLiftPlugin\Source\GameliftServer\ThirdParty\GameLiftServerSDK\Win64\
directory.
Complete the following tasks, working in your game project files.
Install the plugin files.
Locate your game project root folder, such as
... > Unreal Projects/[project-name]/
. If the Plugins folder doesn't exist there, then create it.Go to the
amazon-gamelift-plugin-unreal
folder unzipped fromamazon-gamelift-plugin-unreal-<>-sdk-<>.zip
. Copy theGameLiftPlugin
folder from thegamelift-plugin-unreal
folder to thePlugins
folder in the game project directory.
-
Add the plugin to the
.uproject
file.-
In your game project root folder, open the
.uproject
file. -
Update the file to add "GameLiftPlugin" and "WebBrowserWidget" to the
Plugins
section and enable them. The following code shows the updated.uproject
file for a game called "MyGame".
UnrealProjects > MyGame > MyGame.uproject { ... "Plugins": [ { "Name": "ModelingToolsEditorMode", "Enabled": true, "TargetAllowList": [ "Editor" ] }, { "Name": "GameLiftPlugin", "Enabled": true }, { "Name": "WebBrowserWidget", "Enabled": true } ] }
-
-
Change the UE editor version for your project.
If you created a project for one editor version and now want to change to another version (such as a source-build version), you need to update the project.
In your game project root folder, select the
.uproject
file and choose the option Switch Unreal Engine Version. Select a new editor version. Rebuild the project solution with your updates.
In the project root folder, look for a solution (
*.sln
) file. If none exists, select the.uproject
file and choose the option Generate Visual Studio project files.Open the solution file and build or rebuild the project.
Verify that the plugin is enabled in the UE editor.
Note
If you If you already have the editor open, you might need to restart the editor before it recognizes the new plugin.
Open the project in your chosen UE editor.
Check the main editor toolbar for the new Amazon GameLift menu button [need image].
Look in the Content Browser for the Amazon GameLift plugin assets. Make sure that your View Options setting has the Show Plugin Content option selected.