Unity Issue Tracker - UNITY_SERVER definition is incorrect when building the project in Batch Mode
Closed
UUM-9531
UNITY_SERVER definition is incorrect when building the project in Batch Mode
Unity: Dedicated Server
Won't Fix
2023.3.X
2023.2.X
2023.1.X
2022.3.X
2022.2.X
2022.1.X
2021.3.X
2021.2.X
This has been fixed for 2023.3.
The other versions are under investigation.
This issue was already fixed.
Tested on 2023.2.0b9 it didn't reproduce.
This issue was already fixed.
Tested on 2023.1.14f1 didn't reproduce.
This issue was already fixed.
Tested on 2022.3.10f1 didn't reproduce.
Reproduction steps:
1. Open the attached project in file explorer
2. Run the "build.cmd" file in the project folder
3. Run the "PlayerBuild.exe" located in the project folder under /ScriptBuilds/Player/
4. Observe the text in the Player
5. Run the "ServerBuild.exe" located in the project folder under /ScriptBuilds/Server/
6. Observe the outputted text in the ServerBuild.exe console
Expected result: In the Player Build the outputted text is "Player Build" and in the Server Build the console outputs "Server Build"
Actual result: The text in the Player Build says "Server Build" and the console in the Server Build outputs "Player Build"
BuildPlayerOptions doesn't have the "subtarget" property, thus "options = BuildOptions.EnableHeadlessMode" was used for building the Server in 2019.4.39f1, 2020.3.35f1 Unity versions
On Unity versions 2022.1.4f1 and 2022.2.0a16, no text is outputted in the Player but the issue is still present
Prioritise and Follow this issue
Have a workaround or additional info about this issue?