UE4's implementation of multiple inheritance with UClass

 

trying to extend a class from two AClass to add some attributes and methods to it. but it compile error.

 

UCLASS classes can not have multiple inherited classes, except for interfaces.

So each UCLASS can only have one direct inherited class and as many interfaces (UINTERFACE) classes as you want.

 

https://wiki.unrealengine.com/Interfaces_in_C%2B%2B

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326351912&siteId=291194637