Search Issue Tracker
By Design
Votes
0
Found in
2020.1
2020.2
2020.2.2f1
2021.1
2021.2
Issue ID
1309875
Regression
Yes
AssetDatabase.LoadAssetAtPath returns null when called after AssetDatabase.ImportAsset inside OnImportAsset method
Reproduction steps:
1. Open the user's attached project
2. Select Custom Shaders/Test asset and reimport it
3. Observe the Inspector windows
Expected result: Compiled Shader is Hidden/Compiled
Actual result: Compiled Shader is empty
Reproducible with: 2020.1.0b16, 2020.1.17f1, 2020.2.3f1, 2021.1.0b5, 2021.2.0a4
Not reproducible with: 2019.4.20f1, 2020.1.0b13
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
Resolution Note:
Creating an asset in the middle of an import, and trying to import it, is not allowed by the AssetDatabase as it might cause infinite import loop or performance implications. More information about batching with the Asset Database can be found here: https://docs.unity3d.com/Manual/AssetDatabaseBatching.html