I set up two classes. One is a subclass of a player controller. The other is a subclass of a pawn. In my pawn class I try to set up a pointer to that my player controller like so:
UCLASS()
class ARJTestPawn : public APawn
{
GENERATED_UCLASS_BODY()
//I get compiler error saying : "PlayerController is not a member of ARJTestPawn"
UPROPERTY(EditAnywhere, Category=playerController)
ARJPlayerController *playerController;
};
And here’s the header for my player controller
UCLASS()
class ARJPlayerController : public APlayerController
{
GENERATED_UCLASS_BODY()
};
Can any one help a beginner out?
Also here’s other errors I see:
‘UObjectProperty::UObjectProperty’ : no overloaded function takes 4 arguments
It’s a capitalization issue. If you search around I’m sure you’ll find a few other posts about it, but basically FNames are case insensitive, but the first one found sets the capitalization fr the rest of the places you use it. change your variable name to PlayerController and you should be good.
We’ve made a change for 4.5 which will make FName case-preserving for the editor and UHT. This should address the FName case issues you’ve been seeing.
I’ve checked that you’re able to rename asset, actor, and blueprint components in a way that changes only their case. I’ve also tested that you’re able to have a variables in different UObject/UStruct types that vary only by case, and that the UHT will generate code that actually compiles.