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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.