Hello!
I am trying to implement my own PlayerState class. But I am not able to set it as my PlayerState.
This is my custom PlayerState class:
UCLASS()
class CS_API AMyPlayerState : public APlayerState
{
GENERATED_BODY()
public:
int money;
FString name;
int team;
void setTeam(int team);
void setName(FString name);
void setMoney(int money);
};
I tried to set it like this:
NewPlayer->PlayerState = CastChecked<APlayerState>(AMyPlayerState::StaticClass());
Thank you for your help!