Download

Error using UShapeComponent in multi-inheritance

Hi everyone,

I have a big issue trying to make works a generic UShapeComponent creation, I have asked in answershub to get some help, but I didn’t.

https://answers.unrealengine.com/questions/186293/error-creating-inheritance-ushapecomponent.html

Basically the problem happens when I try to build o debug the project (in debug If I select continue works), but it works without any problem in editor mode.

Could someone give me some idea what happens?

Thanks for the help.

That would most likely be because UObjects do not support multiple inheritance.

-Camille

Sorry I realize that I didn’t use the proper name, it’s not multi-inheritance in the way that a class inheritance from two objects.

I mean the creation of UShapeComponent through two hierarchy of inheritance (I attached a picture of the hierarchy in answerhub), I guess it’s because UShapeComponent is a abstract class, but the idea I use it’s the same that epic use, for example, in UTriggerComponents, to decide if it will be a box, sphere,… The only different from the trigger it’s that I use two hierarchy.

How I wrote in the answehub, I found my mistake, I will let it here just in case is useful for someone:

To create abstract object I have to use : CreateAbstractDefaultSubobjecthttps://docs.unrealengine.com/latest/INT/API/Runtime/CoreUObject/UObject/FObjectInitializer/CreateAbstractDefaultSubobject/index.html