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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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