Search Issue Tracker
Fixed in 2020.3.42f1
Fixed in 2020.3.X, 2021.3.X, 2022.1.X, 2022.2.X, 2023.1.X, 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
- Crash on CallWindowProcW when entering Play mode for the second time and running the Editor in the background while using System.Windows.Forms functions
- 2D Freeform Light shadows disappear when light center is offset from shape bounds
- Crash on MarkAllDependencies when opening scenes with Assets from the YarnSpinner package
- Crash on CollectAllSceneManagerAndObjectIDs when opening a specific Scene
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
Resolution Note (fix version 2023.1):
Fixed in: 2023.1.0a6
Resolution Note (fix version 2022.1):
Fixed in: 2022.1.19f1