Search Issue Tracker
Fixed
Fixed in 2020.3.42f1, 2021.3.13f1, 2022.1.19f1, 2022.2.0b9, 2023.1.0a6
Votes
0
Found in
2020.3.36f1
2021.3.0f1
2023.1.0a2
Issue ID
UUM-7896
Regression
No
ArgumentException thrown when calling ObjectFactory.CreateInstance with a custom class inheriting from UnityEngine.Object
Reproduction steps:
1. Open the attached project "1425698.zip"
2. Click "ObjectFactoryExample/Create Material Asset" in the Menu bar
Expected result: No errors are logged in the Console window
Actual result: An error is logged:
ArgumentException: 'type' parameter is abstract and can't be used in the ObjectFactory : EntitySaveTemplate
UnityEditor.ObjectFactory.CreateInstance (System.Type type) (at /Users/bokken/buildslave/unity/build/Editor/Mono/ObjectFactory.bindings.cs:67)
UnityEditor.ObjectFactory.CreateInstance\[T] () (at /Users/bokken/buildslave/unity/build/Editor/Mono/ObjectFactory.bindings.cs:49)
SaveSystem.Editor.CreateInstanceExample.CreateMaterialEditor () (at Assets/CreateInstanceExample.cs:11)
Reproducible with: 2020.3.36f1, 2021.3.6f1, 2022.1.8f1, 2022.2.0a19, 2023.1.0a2
Reproducible on: macOS 12.4 (Intel)
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
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
- Editor crashes on PrepareSpriteTilingData when exiting Play mode
Resolution Note (fix version 2023.1.0a6):
Fixed in: 2023.1.0a6
Resolution Note (fix version 2022.1.19f1):
Fixed in: 2022.1.19f1