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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Add comment