Unity Issue Tracker - PlayerSettings.SetScriptingDefineSymbols doesn't set symbols when buildTarget parameter doesn't match current Build Target
Fixed
UUM-712
PlayerSettings.SetScriptingDefineSymbols doesn't set symbols when buildTarget parameter doesn't match current Build Target
Unity: Dedicated Server
Fixed
2023.1.X
Won't Fix
2023.2.X
2022.2.X
2022.1.X
2021.3.X
2021.2.X
This already landed in a previous version: 2023.1.0a9.
Won't backport since the fix required a breaking API change. A fix is available in 2023.1.0a9, at least.
Canceling this port since 2022.1 is not a supported version anymore. There is also another port opened to track 2022.2 which is the supported version.
Won't backport since the fix required a breaking API change. A fix is available in 2023.1.0a9, at least.
Canceling this port since 2021.2 is not a supported version anymore. There is also another port opened to track 2021.3 which is the supported version.
How to reproduce:
1. Open the user-submitted project
2. Open the Build Settings window and change the Platform to 'Windows, Mac, Linux' (File > Build Settings... > Switch Platform)
3. In the top menu bar, select 'Test > Run'
4. In the File Explorer, open the project folder and run test.exe inside the _Output folder
5. Observe the last 3 lines of the Console output
Expected result: The message 'MY_SYMBOL is defined.' is seen
Actual result: The message 'MY_SYMBOL is not defined. (AAAAAAAAAAAAAAAAA)' is seen
Reproducible with: 2021.2.19f1, 2021.3.0f1, 2022.1.0b16, 2022.2.0a10
Could not test with: 2019.4.37f1, 2020.3.33f1 (Dedicated Server Build Target is unavailable)
Prioritise and Follow this issue
Have a workaround or additional info about this issue?