Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.1.X, 2020.2.X
Votes
0
Found in
2019.1.0a12
2019.4
2019.4.9f1
2020.1
2020.2
Issue ID
1274633
Regression
Yes
NullReferenceException is thrown when calling AssetDatabase.OpenAsset after reopening Unity with the Project tab unfocused
How to reproduce:
1. Create a new project
2. Set the Layout to 'Default' (Window -> Layouts -> Default)
3. Inside the Assets directory create a subfolder 'Editor' and paste the attached Script (OpenFolderTest.cs) inside it
4. Switch from the Project tab to the Console tab
5. Close and reopen the Editor
6. Without switching to the Project tab click 'Open Test' -> 'Run Open Folder Test' located at the top of the Editor
Expected result: the 'Editor' folder is selected (selection can be seen in the Inspector window)
Actual result: NullReferenceException is thrown (but the selection can still be seen)
Reproducible with: 2019.1.0a12, 2019.4.9f1, 2020.1.4f1, 2020.2.0b1
Not reproducible with: 2018.4.27f1, 2019.1.0a11
Workaround:
After reopening the Editor at step 5 switch to the Project tab for a moment (it's not necessary to stay in the Project tab after that)
Notes:
The issue does not occur when the Project window is closed
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
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
- Hovering on the three-dot menu also highlights the tab header near it when not all tabs fit the bar
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0a1
Resolution Note (fix version 2020.2):
Fixed in 2020.2.0b7
Resolution Note (fix version 2020.1):
Fixed in 2020.1.9f1
Resolution Note (fix version 2019.4):
Fixed in 2019.4.13f1