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
- [iOS]"The destination host has an erroneous SSL certificate" error is thrown when using UnityWebRequest to connect to the server with a self-signed certificate
- Freeze/crash on DynamicHeapAllocator::Allocate when opening a specific project
- Text Settings Inspector sections names have no padding
- UI elements shrinking, misaligned buttons, swapped icons, or incorrect styles when rapidly cycling through Scenes in the Player
- Text field does not disappear if Ctrl+Z is pressed while editing in Viewport
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.