Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4
2020.3
2020.3.16f1
2021.1
2021.2
2022.1
Issue ID
1359444
Regression
No
[iOS] ProjectSettings.SetScriptingDefineSymbolsForGroup is not defining symbols and compilation when Platform is set to iOS
The problem seems to be coming from ProjectSettings.SetScriptingDefineSymbolsForGroup that is that is not updating the scripting define symbols and not triggering the script compilation as it should.
The attached script SetSDS.cs a little farther in the ticket is producing the same result without having ProBuilder.
1/ Add this script to an empty GameObject
2/ Change the bool value
Expected result : "TEST_SYMBOL" symbol is added/removed in the player settings and the scripts are recompiled
Actual result : "TEST_SYMBOL"is never added to the player settings and the scripts are not recompiled
Reproducible with: 2019.4.29f1, 2020.3.16f1, 2021.1.17f1, 2021.2.0b8, 2022.1.0a6
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
Setting defines this way indeed requires a "Script Reload" to actually apply. This can easily be done by calling https://docs.unity3d.com/ScriptReference/EditorUtility.RequestScriptReload.html. That is because defines need to be kept in sync between what user-code is currently running in the editor and the result of a player build.
We could make the "RequestScriptReload" call done automatically, but unfortunately that would break a lot of users depending on current behaviour.
As the workaround is quite easy to put in place, we wont fix this.