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
- [OpenGLES][XR] Zooming in on the camera's URP opaque texture causes "double vision" on Quest in OpenGLES3
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
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.