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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.