Hey guys I hope someone can help me. I’m having a problem with casting an empty class that has only been declared. I’m following a tutorial that is not very old so it might be something I’m doing wrong but I can’t find a fix. I created a pointer to the declared class so the header file knows what it is. I then try to cast this pointer into UGameplayStatics::GetPlayerPawn(this,0)). The whole entire line is…
PlayerPawn = Cast(UGameplayStatics::GetPlayerPawn(this, 0));
the APawnTank is the created class declared in the header file and I’m trying to cast it to the player pawn.
The cast doesn’t seem to ever be successful and when I try to use PlayerPawn which should’ve been Cast I always get an error. the two errors I get are…
-
error C2027: use of undefined type ‘APawnTank’
-
note: see declaration of ‘APawnTank’
I’ve been tryijng to fix it for a few days and I can’t find anything helpful. so any help would be appreciated ![]()
This is also all written in unreal c++ ![]()
