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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.