Search Issue Tracker
By Design
Votes
0
Found in
2020.3
2020.3.25f1
2021.2
2022.1
2022.2
Issue ID
1395773
Regression
No
Prefab Variant isn't reimported after ScriptedImporter result changes
Reproduction steps:
1. Open project "SIOrder"
2. Reimport "Assets/DependsOnSphere-c1 Variant" (Right-click > Reimport)
3. Reimport "Assets/SpherePrefab"
Expected result: The "DependsOnSphere-c1 Variant" GameObject's material does not get removed
Actual result: The "DependsOnSphere-c1 Variant" GameObject's material gets removed
Reproducible with: 2020.3.31f1, 2021.2.15f1, 2022.1.0b11, 2022.2.0a8
Could not test with: 2019.4.36f1 (Compilation errors: Assets/Editor/CustomImporter1.cs(9,40): error CS0246: The type or namespace name 'AssetImportContext' could not be found (are you missing a using directive or an assembly reference?))
Notes:
-Reimporting "Assets/DependsOnSphere-c1 Variant" again makes "DependsOnSphere-c1 Variant" GameObject's material appear
-If the issue is not reproducible on the first try, do steps 2-3 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 "The GUID inside 'Assets/asset.png.meta' cannot be extracted by the YAML Parser." when opening the project
- Shadows disappear when looking at a certain angle in Scene view and using Cloud Shadows with Volumetric Clouds
- StackOverflowException freezes or silently crashes the Editor
- Microsoft Surface Device freezes when detaching and reattaching physical keyboard attachment to a Microsoft Surface device in Standalone Player for Windows
- Shadows are cast with artifacts on GameObjects when the light type is set to Point
Resolution Note:
To fix the issue:
In CustomImporter0.cs change:
From:
[ScriptedImporter(0, ".custom-0", importQueueOffset: 1000)]
to
[ScriptedImporter(1, ".custom-0", importQueueOffset: 500)]
CustomImporter1.cs:
From:
[ScriptedImporter(0, ".custom-1", importQueueOffset: 1000)]
to
[ScriptedImporter(1, ".custom-1", importQueueOffset: 500)]
The first argument is the version number, this is not strictly needed but avoid any need to manually reimport the assets.
The importQueueOffset set to 500 is important for the resulting prefabs/variants to be processed with the other prefabs.