Search Issue Tracker
Fixed in Unity 2018.3
On project load, Unity Editor calls additional InitializeOnLoad events that fail to LoadAssetAtPath
1. Download attached project "Bolt.Unity.Debug46.zip" and open in Unity
2. Open "1972" scene
3. Press Tools > Bolt > Unit Options Window...
4. In the opened window scroll down and press the "Next" button
5. Scroll down again and press the "Generate" button
6. Wait until it generates unit database
7. When Bolt window closes itself, press the "Clear" button in Console window
8. Close the Unity Editor entirely
9. Open project "Bolt.Unity.Debug46.zip" again
10. Inspect Console window
Expected results: There will be only one "InitializeOnLoad" log
Actual results: There will be two or more "InitializeOnLoad" logs and "LoadAssetAtPath" returns null during that method call
- This issue reproduces on both Windows and OSX
- In the scope of the first "InitializeOnLoad", "LoadAssetAtPath" returns null
- User code is seemingly not at fault here, because the second "InitializeOnLoad" does not report any error with "LoadAssetAtPath"
- Starting with Unity 2018.1.0b7, it logs to the Console window only two "InitializeOnLoad"
- Starting with Unity 2018.2.0a2, it logs to the Console window two or more "InitializeOnLoad" and "LoadAssetAtPath" returns null during that method call
Reproduced on Unity 2018.1.0b7, 2018.1.9f1, 2018.2.0a2, 2018.2.0f2 and 2018.3.0a5
Could not reproduce on Unity 2017.4.7f1 and 2018.1.0b6
Regression on Unity 2018.1.0b7
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Windows High DPI scaling breaks Graphics.DrawTexture
- Particle system billboard particles are invisible when specific "3D Start Rotation" with "Random Between 2 Constants" is applied
- Preview Camera has wrong CameraType when Camera preview is present on Scene View
- Scaling the box in Events Example of ExtOSC plugin causes Unity to crash
- [HDRP] The Game Object is invisible in the Scene and Shader Graph prieview when the Transform node set World to Object position