Search Issue Tracker
Fixed in 2021.2.X
PrefabUtility.SaveAsPrefabAsset() returns null when creating new prefab on AssetPostprocessor.OnPostProcessAllAssets()
1. Open the attached project inside of "PrefabUtilitySaveAsAssetIssue.zip"
2. Delete "untitled_prefabroot" Prefab Asset if it exists (Might appear due to reimport)
3. Right-click on "untitled" Asset and click on "Reimport"
Expected result: No ArgumentNullExceptions are thrown inside the Console log
Actual result: ArgumentNullException is thrown inside the Console log
Reproduces on: 2018.3.12f1, 2019.1.0f1, 2019.2.0a11
- PrefabUtility.SaveAsPrefabAsset() was introduced as of 2018.3.0a6
- PrefabUtility.SaveAsPrefabAsset() overload with success boolean returns "true" even when method returns null
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [iOS] Building an iOS project with the new Xcode 15 linker fails
- Prefab's scripts are constantly reloaded when trying to enter multiple digits or characters into public fields on custom scripts consecutively
- [Linux] Progress modal window stays on top of every other window and cannot be moved
- Crash on mono_g_hash_table_find_slot when entering Play Mode
- [iOS] Crash when pressing "Done" on the keyboard layout