Cast AActor to empty(none) error
I have a inventory class that is derived by a empty class(none) and a AActor that inherits from this class. But I want to cast from the actor to the inventory and I get compile errors like this: no sutable constructor exists from AActor to Inventory.
Maybe I'm casting wrong or I'm using the wrong function but I can't figure out the solution, thought I hope someone can help.
Here is the source code:
The normal Cast doesn't compile too:
Could It be that UE doesn't support this option and I need to write my one cast function, but I don't know how it works so I hope that someone shows me the right path.
Thanks a lot for every help and if my question was unclear or I didn't provided enough information feel free to ask : )
asked Jul 01 '17 at 04:45 PM in C++ Programming
UE4 is not supporting multiple inheritance. yes - it is very annoying, but we have to deal with that.
You can get around it using Interfaces, or components.
answered Jul 01 '17 at 05:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here