We’ll use the third-person template from Unreal Engine. All the components come with networking out of the box. These steps also apply to any other Unreal Engine games.
If you’re following this guide on an existing project, ensure that your project is version controlled before
making any changes.
We need to add a target so you can compile your game as a dedicated server to run on Rivet.Create a file at Source/MyProjectServer.Target.cs with the following. Replace MyProject with your project’s name.
Source/MyProjectServer.Target.cs
Copy
using UnrealBuildTool;using System.Collections.Generic;public class MyProjectServerTarget : TargetRules{ public MyProjectServerTarget(TargetInfo Target) : base(Target) { Type = TargetType.Server; DefaultBuildSettings = BuildSettingsVersion.V2; IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1; ExtraModuleNames.Add("MyProject"); }}