Search Issue Tracker
Fixed in 2021.2.X
Votes
2
Found in
2018.3.0a6
2018.3.11f1
2019.1.0a1
2019.2.0a1
Issue ID
1144276
Regression
No
PrefabUtility.SaveAsPrefabAsset() returns null when creating new prefab on AssetPostprocessor.OnPostProcessAllAssets()
Reproduction steps:
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
Note:
- PrefabUtility.SaveAsPrefabAsset() was introduced as of 2018.3.0a6
- PrefabUtility.SaveAsPrefabAsset() overload with success boolean returns "true" even when method returns null
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
- Prefab Override popup displays on wrong monitor when Inspector width is resized to minimum
- Scroll View is not moving by inertia after scrolling by click and dragging when Editor window is minimized and Canvas "Render Mode" is set to "World Space"
- "type mismatch error" occurs when the currentDirectionWS output of a Sample Water Surface node is connected to a float3 input
- URP Material Upgrade utility does not enable Alpha Clipping when material had Rendering Mode set to Cutout
- Particle System emission ignores the Sprite Atlas when using a Material that has the "Include in Build" setting unchecked
Resolution Note (fix version 2021.2):
Fixed in 2022.1.0a4
Resolution Note (fix version 2021.2):
Fixed in: 2021.2.0b12