Adding a Server Module in the Project
Â
Follow the steps to set up the multiplayer server:
Â
Step 1. Navigate to Source folder
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 2. Create a new file and name it as YourProjectNameServer.Target.cs
Â
Make sure to replace YourProjectName with the actual name of your project.
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 3. Open the YourProjectNameServer.Target.cs file in any text editor, add the following code, and save it
Â
Make sure to replace YourProjectName with the actual name of your project.
Â
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class YourProjectNameServerTarget : TargetRules
{
public YourProjectNameServerTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Server;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "YourProjectName" } );
}
}
Â
Â
Â
Don't forget to save the file from your editor after making the changes.
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 4. Right-click the .uproject file of your Unreal Engine project and select Generate Visual Studio project files.
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 5. Double-click the .sln file to open the project in Visual Studio.
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 6. Set the configuration to Development Server and build the project by pressing Ctrl + B
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 7. Once the build is successful, switch the configuration to Development Editor and build the project by pressing Ctrl + B. Then press F5 to open the project automatically.
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 8. Navigate to project settings
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 9. Select Maps and Modes
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Step 10. Configure Maps and Modes
Â
Global Default Server Game Mode: Set the same game mode as the Default Game Mode.
Server Default Map: Set as ThirdPersonMap
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Ask questions and help your peers Community Forum
Need help? Contact Support
Â
Facebook | GitHub | LinkedIn | YouTube
Â
Â