Unity Issue Tracker - GetActiveBuildProfile can only be called from the main thread crash and error when switching from Windows to Android
Fixed
UUM-91151
GetActiveBuildProfile can only be called from the main thread crash and error when switching from Windows to Android
Unity: Shader System
Fixed
6.1.X
6000.1.0a2 onwards
6.0.X
6000.0.20f1 onwards
Won't Fix
6.2.X
Tested 4 times and did not repro with 6000.1.0b3
Verified 6000.0.38f1, switching between windows and android URP did not crash
Steps to reproduce:{}
Create a new project with URP Sample > com.unity.template.urp-sample.
Once the project opens, open Build Profile window.
Create a new Android Profile.
Switch to the new Profile.
Actual results: We get a console error and unity crash after script recompile
UnityException: GetActiveBuildProfile can only be called from the main thread. Constructors and field initializers will be executed from the loading thread when loading a scene.
Expected results: Editor does not crash or throws errors after restart.
Reproducible with versions: 6000.1.0a9
Not reproducible with versions: 6000.0.26f1, 6000.0.29f1
Tested on (OS):{}
macOS (Does not repro)
Windows
Notes:{}
Reports on discussions indicate that this issues occur on the following versions: 6000.0.28 and above. However, they do not seem consistent based on my testing on those versions. The issue is consistent on trunk.