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
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
- Hovering on the three-dot menu also highlights the tab header near it when not all tabs fit the bar
Resolution Note (fix version 2023.1.0a6):
Fixed in: 2023.1.0a6
Resolution Note (fix version 2022.1.19f1):
Fixed in: 2022.1.19f1