Search Issue Tracker
By Design
Votes
0
Found in
2018.2.0x
Issue ID
1063806
Regression
No
[Backend] PrefabUtility.CreatePrefab returns null when called from ScriptedImporter.OnImportAsset
How to reproduce:
1. Open the "CreatePrefab.zip" project
2. Delete "Assets/MyPrefab" asset
3. MyCustomMenu > Create Prefab, notice that no errors are thrown
4. Delete "Assets/MyPrefab" asset
5. Reimport "Assets/MyCustomAsset", notice the "prefab == null" error
Actual result: PrefabUtility.CreatePrefab references to null if called via ScriptedImporter.OnImportAsset
Expected result: PrefabUtility.CreatePrefab should refer to the recently created prefab
Reproducible with: 2018.3.0a6, 2018.2.0x-ImprovedPrefabs.
Not reproducible with: 2018.2.1f1, 2018.1.9f1, 2017.4.8f1.
Notes:
MyCustomImporter.cs calls "CreatePrefab()" (line 20) function on reimport or when "Create Prefab" menu option is pressed, which creates prefab.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[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
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Add comment