I’d like to create build targets that allow me to “swap” between building with OnlineSubsystemSteam
support, and building with the typical OnlineSubsystemNull
. Basically, during development, I’d like to be testing network code directly within the editor, and then switch to building the Steam-enabled target when I need to test it in Steam. IIRC, to properly test a Steam-enabled project, it needs to be packaged, so having a non-Steam target seems like a decent means to avoid having to wait for building, packaging and deploying just to test changes to a single line of code.
Is this possible?
Here's what I've tried:
- MyGame.Target.cs
- File copied and changed to MyGameSteam.Target.cs
- MyGameEditor.Target.cs
- File copied and changed to MyGameSteamEditor.Target.cs
- MyGameServer.Target.cs
- File copied and changed to MyGameSteamServer.Target.cs
- MyGame.Build.cs
- File copied and changed to MyGameSteam.Build.cs
This gives me the following error when generating project files:
Running D:/UE4S/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="D:/Projects/SourceProjects/ProjectMyGame/MyGame/MyGame.uproject" -game -engine -progress
Discovering modules, targets and source code for project...
UnrealBuildTool Exception: ERROR: Not expecting project D:\Projects\SourceProjects\ProjectMyGame\MyGame\Intermediate\ProjectFiles\MyGame.vcxproj to already have a target rules of with configuration name Game (MyGameTarget) while trying to add: MyGameSteamTarget