ArgumentException: 'type' parameter is abstract and can't be used in the ObjectFactory

I’ve got a class whose parent is UnityEngine.Object. (Yes, I really do want it to be a UE Object. No, I don’t want it to be a ScriptableObject.)

I’m trying to instantiate a member of this class. I call ObjectFactory.CreateInstance() and I get a bizarre error:

ArgumentException: ‘type’ parameter is abstract and can’t be used in the ObjectFactory: MyObject

The error is clear, straightforward, well-worded… and completely wrong, as this is not an abstract class. I checked in the reference source, and that error message isn’t found anywhere. There is a check to see if the class is abstract, but it gives a different error message which I’m not seeing, which means that this is coming from the black box C++ code somewhere.

Does anyone know what can cause ObjectFactory to give a false positive here, and how I can work around it?

2 Likes

The same… Have the bug in the fundamental feature (object creation).

I still get that error… same case here :frowning:
Same bug
A year later…