Setting Up the Unreal SDK #
This tutorial can be run against a new Unreal C++ project or a preexisting one.
Prepare the Unreal plugin #
Create a
Plugins
folder in the root of your Unreal project using File Explorer.Copy
pragma-engine/sdk/unreal4/update-pragma-sdk.sh
to thePlugins
folder you just created.Open the
update-pragma-sdk.sh
script and modify as follows:
Uncomment
SOURCE_ENGINE_GITHUB_REPO
.Change the value of
SOURCE_ENGINE_GITHUB_REPO
to point to your Pragma Engine repo.Uncomment
TARGET_PRAGMA_SDK_DIR
.Change the path to
PragmaSDK
.
Run
update-pragma-sdk.sh
in Git Bash from the directory where you copied the script. Confirm that thePragmaSDK
folder now exists in yourPlugins
directory.Open your Unreal Project’s
Config/DefaultGame.ini
and add the following configuration information to the bottom:[/Script/PragmaSDK.PragmaSdkConfig] BackendAddress="http://127.0.0.1:10000" [/Script/PragmaSDK.PragmaLobbyService] bEnabled=true
Open
Source/[Project Name]/[Project Name].Build.cs
and addPragmaSDK
to thePublicDependencyModuleNames
array:PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "PragmaSDK" });
Set up Rider in Unreal Editor #
We recommend using Rider, which requires additional setup.
- In Unreal Editor, click the Edit menu, then Editor Preferences….
- In the left panel of the Editor Preferences window, click Source Code under the General heading. Select Rider from the Source Code Editor dropdown, then click Set as Default. Accept all the dialog boxes that appear.
- Close and reopen Unreal Editor to make the source code editor changes take effect. Upon relaunching Unreal Editor, if asked to rebuild missing modules, click Yes.
- Refresh your code from the Unreal Editor File menu.
- Open the
[Project Name].uproject
file in Rider.
We’ve found Rider to be more compatible with Unreal for this guide. You can also use Visual Studio, but may encounter different setup requirements.