How to reproduce:
1. Create and open a new project
2. In the toolbar, navigate to Window > Package Management > Package Manager
3. In the Package Manager window, select the “Unity Registry” tab
4. Find and install the “Web Stripping Tool” package
5. In the toolbar, navigate to Window > Web Optimization > Submodule Stripping
6. Dock the newly opened window with Game/Scene window
7. Make sure the window is hidden, by focusing either Game or Scene window
8. Restart the Editor
9. In the toolbar, navigate to File > Build Profiles
10. Build the project for Web
11. Observe the Console
Expected result: The build finishes, no errors thrown in the Console
Actual result: The build finishes, “NullReferenceException” error is thrown in the Console
Reproducible with: 0.1.0-exp.1 (6000.1.0a4), 1.1.0 (6000.1.10f1, 6000.2.0b8, 6000.3.0a1)
Couldn’t test with: 2022.3.64f1, 6000.0.52f1 (package is not supported)
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Notes:
- Does not reproduce when building for Windows
- Does not reproduce if the “Submodule Stripping” window is focused
- An “NullReferenceException: Object reference not set to an instance of an object” error is thrown