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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
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.