Search Issue Tracker
By Design
Votes
1
Found in
2017.4.0f1
2018.4.0f1
2019.1.14f1
2019.2.0a1
2019.3.0a1
2020.1.0a1
Issue ID
1186968
Regression
No
Asset will return null even if that Asset exists when calling Resources.Load, but only for the first time
How to reproduce:
1. Open the attached project in editor.
2. Notice the error log "EditorInit could not get the TestScriptable asset" despite the fact that the asset is part of the project.
3. Close and reopen the project.
4. Notice the error log is not present anymore.
- optionally: close the project, delete the /Library folder, reopen the project, notice that the error log is back.
Reproducible with: 2017.4.32f1, 2018.4.10f1, 2019.2.7f2, 2019.3.0b5, 2020.1.0a6
Actual results: Assets return fake null for the first time
Expected results: if the Asset exists it shouldn't return null
Comments (1)
-
mosowskitsg
Aug 14, 2020 23:48
I managed to reproduce this issue on 2020.1.2f1 with simple Resources.Load<GameObject>() call in Start method. Method fails until I do "something complex enough", i.e. change script and recompile or reimport specified prefab.
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
- "Draw Additional Lights Shadowmap" calls increase when custom MaterialBlockProperty is used
- Crash on _platform_memmove when importing the "Dragon Crashers - URP 2D Sample Project" to a new 2D project
- "Shader is not supported on this GPU" warnings and and shaders are not loading when building the project for non-Chromium browsers
- [iOS][URP] The screen flickers and the "Execution of the command buffer was aborted due to an error during execution" error is thrown continuously
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
Resolution Note (2019.3.X):
Non scripts can not reliably be loaded from InitializeOnLoad static constructors