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
- Rendering locks up when not looking at a transparent material on Meta Quest 2
- Volumetrics break when using a Custom Pass to create a Thickness Buffer for Alpha Clipping
- All tests are run instead of only the failed ones when the "Rerun Failed" button is pressed
- GameObject is not masked when the "Render PostProcessing Effects" pass executes with a resolved non-MSAA Color target and MSAA DepthStencil target
- [Android] Gfx.WaitForGfxCommandsFromMainThread high performance usage and inconsistency when built Player scene has Canvas GameObject on a specific Project
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.