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
- Standalone Profiler Targets another Project if a Standalone Profiler was launched in it before when switching between Edit or Play Mode Targets
- Crash on ForwardRenderLoopJob when opening a specific project
- [Android] Memory leak and eventual crash on Snapdragon 8 Gen 1+ devices when a Clear Pass is executed after Framebuffer Fetch
- PhysicsRaycaster ray length is incorrect when casting from rotated Camera
- Crash on EnumerateDisabledKeywordsInVariantsArray or UNITY_XXH32 when rapidly saving ShaderGraph or VFXGraph changes
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.