I have no experience in C++ and only built my project in it so C++ plugins wouldn’t break my BP project.
I have not edited the GameCharacter.cpp file and am using a blueprint Character Actor not derived from this .cpp, could I just delete this .cpp file to get rid of the error?
The error messages are:
C2027 | Use of undefined type 'UWorld'
C2227 | left of '->GetDeltaSeconds' must point to class/struct/union/generic type
And reference this block in my GameCharacter.cpp
void AGameCharacter::TurnAtRate(float Rate)
{
// calculate delta for this frame from the rate information
AddControllerYawInput(Rate * BaseTurnRate * GetWorld()->GetDeltaSeconds());
}
void AGameCharacter::LookUpAtRate(float Rate)
{
// calculate delta for this frame from the rate information
AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds());
}
As Well as the definition in “ActorComponent.h”
virtual UWorld* GetWorld() const override final { return (WorldPrivate ? WorldPrivate : GetWorld_Uncached()); }