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
- Crash on CollectAllSceneManagerAndObjectIDs when opening a specific Scene
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- SetComponentEnabled uses class instead of struct when constraining Enableable Component type
- [iOS] Application.deepLinkActivated does not get invoked while app is running when UIApplicationSceneManifest is added in Info.plist
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).