Search Issue Tracker
By Design
Votes
0
Found in
2020.3
2021.1
2021.2
2021.2.0b3
2022.1
Issue ID
1350105
Regression
No
Assets that are referenced by custom MonoBehaviour are null after reloading the Prefab
How to reproduce:
1. Open the user's attached project
2. Build and Run Scenes/SampleScene scene
3. Observe the logged messages
Expected result: "1 Before Unload : meshFromComponent == null: False"
Actual result: "1 Before Unload : meshFromComponent == null: True"
Reproducible with: 2020.3.14f1, 2021.1.15f1, 2021.2.0b4, 2022.1.0a2
Not reproducible with: 2019.4 (could not downgrade)
Note: Only reproducible in the built Player
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
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
Resolution Note:
AssetBundle.LoadAsset API does not reload an asset that is already loaded. You must first unload the asset using AssetBundle.Unload(true) before loading it again if you want to reload it.