(1)下载UnrealEngine源码,当前使用的版本4.26.2
文件目录如下:

右键ShooterGame.uproject

指定到源码引擎
(2)配置VS工程,当前使用Vs2019
工程结构如下:

其中ShooterServer.Target.cs自己创建,内容如下
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
[SupportedPlatforms(UnrealPlatformClass.Server)]
public class ShooterServerTarget : TargetRules
{
public ShooterServerTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Server;
bUsesSteam = true;
ExtraModuleNames.Add("ShooterGame");
}
}
UE4搭建服务器

本文介绍如何使用Unreal Engine 4.26.2版本搭建服务器的过程。首先下载并指定源码引擎,接着配置Visual Studio 2019工程,创建自定义的服务器目标配置文件。之后通过DebugGameEditor打包生成可运行的客户端与服务器exe文件,并说明服务器的启动方式及客户端连接流程。
最低0.47元/天 解锁文章
5736

被折叠的 条评论
为什么被折叠?



