Because Texture2D is a base class and can't be directly constructed from a Variant, as the macro tries to do.
Describe the solution you'd like
It'd be nice if the macro could somehow handle the possibility of the argument being any of the derived types of Texture2D.
Describe alternatives you've considered
I could create an overload for every type of Texture2D manually, but there's a lot of them.
Is your feature request related to a problem? Please describe. I would like to expose a method that takes in any Texture2D:
But I get the error:
Because Texture2D is a base class and can't be directly constructed from a Variant, as the macro tries to do.
Describe the solution you'd like It'd be nice if the macro could somehow handle the possibility of the argument being any of the derived types of Texture2D.
Describe alternatives you've considered I could create an overload for every type of Texture2D manually, but there's a lot of them.