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.
- The script can be dragged and dropped before it is compiled
- Double clicking script field no longer opens it in the external script editor
- [Android] Build fails with built-in PAD custom asset(s) when using sample Addressable
- [iOS] nw_read_request_report crash
- The serialized field value cannot be changed when trying to set it back to "None"