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
- Mistakes in multiple Particle System Components pop-up
- Hovering on the Particle System Controls shows an offset tooltip with the overlay window name
- Inconsistent UI hover colour with poor contrast in VFX Graph window
- Lights with Cookies generate Cookie Atlas and increase Memory usage every time when Play mode is entered
- Crash on mono_traverse_object_internal when exiting Play mode on a specific project
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).