Missing type specifier - int assumed

Hello, I have the following code in my header that works fine:

UAnimInstance* Animation;

However, when I change it to an extended UAnimInstance I made:

UUnitAnimInstance* Animation;

I get all kinds of errors:

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2143: syntax error : missing ';' before '*'

And then errors for every part of my code that is using Animation. Why would it be doing this?..

Here’s the Extended code

UCLASS(transient, Blueprintable, hideCategories = AnimInstance, BlueprintType)
class THIRDPERSON_API UUnitAnimInstance : public UAnimInstance

Any ideas why my extended class is causing so many problems, even though it’s not that different? (I followed a tutorial for it)


Note: I tried changing UCLASS back to empty, and having an empty extended class, it always makes that error though.


Are you including the header file for the extended animinstance class ? or try using :

 class UUnitAnimInstance* Animation;


having ‘class’ in the .h and #include “UUnitAnimInstance.h” in the cpp did the trick.

Thankyou. :slight_smile: