Search Issue Tracker
By Design
Votes
0
Found in
2019.2
2019.3.0f6
2020.1
Issue ID
1219721
Regression
No
Missing refernces when reimporting many ScriptedImporter Assets
Steps to reproduce:
1. Open user-supplied project
2. Inspect the Data folder
Expected: Scriptable object references match with what has been imported
Actual: notice that the Scriptable objects have different references than their import settings (see attached pictures).
Reproduced in: 2019.2.21f1, 2019.3.2f1, 2020.1.0a23
Not reproduced in: 2017.4.37f1 (assets break), 2018.4.17f1 (assets break)
Note: reimporting a single Asset will resolve the mismatch, however after "Reimport all" the references are mismatched again
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
- Selection outline is not shown when selecting a high intensity HDR Swatch preset in Color Picker
- Multiplayer Center some labels are truncated permanently even when the window is fullscreen and there is a lot of space
- ArgumentOutOfRangeException error appears when navigating through items in the Component browser
- Multiplayer Center Banner titles are not light-theme friendly and there is a gray panel overlapping with the Unity logo
- Combined Log and Throw Exceptions Function does not show up in Diagnostics Cloud Dashboard when called in Player
Resolution Note (2020.2.X):
When you create a managed reference to an asset in your importer the asset needs to be loaded which means it has to be already imported.
So it would seem this is an import order problem.
And if it was only that then you could solve it with GatherDependenciesFromSourceFile making the referenced assets an import dependency.
But it's more complicated than that since in your case the assets can reference each other in a cycle.
And of course you can't create a cyclic dependency between assets.
I suggest to take a look at LazyLoadReference<> and see if you can handle asset references through this class (both edit time and import time).