Plugin for Unreal: Install and set up plugin components - Amazon GameLift

Plugin for Unreal: Install and set up plugin components

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:

  • 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.

Build the Amazon GameLift C++ server SDK

The Amazon GameLift plugin for Unreal Engine release package contains the source code for the C++ server SDK for Unreal. Before you can use it with the plugin, you need to extract the source code and build it for your development environment.

Note

If you're building game servers to run on an Amazon Linux 2023 runtime environment, you can take advantage of a helper script, which is available as part of the Amazon GameLift Toolkit repository. Use this helper script to generate the SDK binary and the SSL libraries that you need for use with the plugin. You can use the script when you're developing with Unreal Engine 5 on Windows or Linux. The script is a Docker-based solution. You can run it locally with git and docker installed, or your can run the script using AWS CloudShell in the AWS Management Console.

Learn more about the Amazon GameLift build script for Unreal Engine 5.

To manually build the C++ server SDK for Unreal
  1. 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.

  2. Open the GameLift-Cpp-ServerSDK-<> folder, and then complete the following instructions for your platform: Linux or Microsoft Windows.

Linux

  1. 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.

  2. Copy /lib/aws-cpp-sdk-gamelift-server.so to the amazon-gamelift-plugin-unreal/GameLiftPlugin/Source/GameliftServer/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/ directory.

Microsoft Windows

  1. 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

  2. Copy the files to the amazon-gamelift-plugin-unreal\GameLiftPlugin\Source\GameliftServer\ThirdParty\GameLiftServerSDK\Win64\ directory.

Add the plugin to your game project

Working in the Unreal Editor with your game project open, complete the following tasks.

To add the plugin to a project
  1. Install the plugin files.

    1. Locate your game project root folder, such as ... > Unreal Projects/[project-name]/. Locke for a Plugins folder. If the folder doesn't exist there, then create it.

    2. Unzip the plugin release package (amazon-gamelift-plugin-unreal-<>-sdk-<>.zip). Open the amazon-gamelift-plugin-unreal folder and find the GameLiftPlugin folder. Copy this folder into the Plugins folder from Step 1.

  2. Add the plugin to the .uproject file.

    1. In your game project root folder, open the .uproject file.

    2. 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 } ] }
  3. 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.

  4. Rebuild the project solution with your updates.

    1. 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.

    2. Open the solution file and build or rebuild the project.

  5. 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.

    1. Open the project in your chosen UE editor.

    2. Check the main editor toolbar for the new Amazon GameLift menu button [need image].

    3. 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.