So, right now, I am trying to get a Dedicated Server running. I’ve downloaded the source version of 4.14 and everything went well with building it. I started a new C++ project and then packaged it. Then, I went in and added a Server.Target.cs file for my project with:
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class GameServerTarget : TargetRules
{
public GameServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
}
//
// TargetRules interface.
//
public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
base.SetupBinaries(Target, ref OutBuildBinaryConfigurations, ref OutExtraModuleNames);
OutExtraModuleNames.Add("Game");
}
public override bool GetSupportedPlatforms(ref List<UnrealTargetPlatform> OutPlatforms)
{
// It is valid for only server platforms
return UnrealBuildTool.UnrealBuildTool.GetAllServerPlatforms(ref OutPlatforms, false);
}
public override List<UnrealTargetPlatform> GUBP_GetPlatforms_MonolithicOnly(UnrealTargetPlatform HostPlatform)
{
if (HostPlatform == UnrealTargetPlatform.Mac)
{
return new List<UnrealTargetPlatform>();
}
return new List<UnrealTargetPlatform> { HostPlatform, UnrealTargetPlatform.Win32, UnrealTargetPlatform.Linux };
}
public override List<UnrealTargetConfiguration> GUBP_GetConfigs_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform)
{
return new List<UnrealTargetConfiguration> { UnrealTargetConfiguration.Development };
}
}
After that, I replaced the three instances in which it has the word Game and replaced it with the name of my project. I saved and then went to right click on my project again and clicked “Generate Visual Studio project files”. However, it stopped immediately and gave me this message in the log:
Running C:/Program Files (x86)/Epic Games/4.14/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“C:/Users/Ryan Brock/Documents/Unreal Projects/TrialRun/TrialRun.uproject” -game -rocket -progress
Discovering modules, targets and source code for project…
Messages while compiling C:\Users\Ryan Brock\Documents\Unreal Projects\TrialRun\Intermediate\Build\BuildRules\TrialRunModuleRules.dll:
c:\Users\Ryan Brock\Documents\Unreal Projects\TrialRun\Source\TrialRunServer.Target.cs(32,48) : error CS0115: ‘TrialRunServerTarget.GUBP_GetPlatforms_MonolithicOnly(UnrealBuildTool.UnrealTargetPlatform)’: no suitable method found to override
c:\Users\Ryan Brock\Documents\Unreal Projects\TrialRun\Source\TrialRunServer.Target.cs(41,53) : error CS0115: ‘TrialRunServerTarget.GUBP_GetConfigs_MonolithicOnly(UnrealBuildTool.UnrealTargetPlatform, UnrealBuildTool.UnrealTargetPlatform)’: no suitable method found to override
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files
I’ve fallowed all of the video and text guides that everyone has posted, but it still gives me the same error.