Search Issue Tracker

Won't Fix

Votes

3

Found in

2022.2.0b8

2023.1.0a11

2023.2.0a1

2023.3.0a1

2024.1.0a1

Issue ID

UUM-9531

Regression

Yes

UNITY_SERVER definition is incorrect when building the project in Batch Mode

--

-

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"

Reproducible with: 2021.2.0a20, 2021.3.4f1, 2022.1.5f1, 2022.2.0a17, 2023.1.0a1
Not reproducible with: 2019.4.39f1, 2020.3.35f1, 2021.2.0a19

Reproducible on: Windows 10 (21H2)

Notes:
- 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

  1. Resolution Note:

    There are no fixes planned for this Bug

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.