So I have this in my header:
class UChildActorComponent* childActor;
public:
AThirdPersonPlayerController(const FObjectInitializer& ObjectInitializer);
And this in my cpp file:
AThirdPersonPlayerController::AThirdPersonPlayerController(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
childActor = CreateDefaultSubobject(TEXT(“ChildActor”));
}
I’m getting these errors:
error C2027: use of undefined type ‘UChildActorComponent *’
error C2440: ‘static_cast’ : cannot convert from ‘UObject *’ to ‘UChildActorComponent *’
I’m working in C++ in ue4 4.7.2. Am I initializing it incorrectly?