Search Issue Tracker
Won't Fix
Votes
1
Found in
2021.3.33f1
2022.3.16f1
2023.2.4f1
2023.3.0a19
6000.0.0b11
Issue ID
UUM-59079
Regression
No
Asset references are lost when the Asset is overwritten using AssetDatabase.CreateAsset()
Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/SampleScene“ Scene
3. Enter Play mode and observe the value of the “Assets/MyAsset.asset” in the Console
4. Exit Play mode and overwrite “Assets/MyAssets.asset“ (Tools > My Asset Editor > Save My Asset)
5. Enter Play Mode and observe the value of the “Assets/MyAsset.asset” in the Console
Expected result: In both steps 3 and 5, the value logged in the Console is the same
Actual result: In step 5 after the asset is overwritten, it throws NullReferenceException
Reproducible with: 2021.3.33f1, 2022.3.16f1, 2023.2.4f1, 2023.3.0a19
Reproducible on: Windows 11
Not reproducible on: No other environment tested
Note: Restarting the Editor or reimporting the “SampleScene“ Scene fixes the issue
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
- Spot Light with 'Box' Shape stops working when it collides with Mesh
- Accepting Asset Store EULA endless loop in Package Manager window
- “InvalidOperationException: Sequence contains no matching element“ error when reenabling a custom Debug Draw Mode
- Prefab that contains a layout group is marked as changed by the Editor when opened
- Emission animation does not appear when the "Emission Map" parameter is set to black in a Lit material
Resolution Note:
Thank you for reporting a bug to Unity.
We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.
Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.