Cast of child of APlayerState fails c++

I’m quite new to UE, so I’m not sure what’s the problem, I created a custom PlayerState class derived from APlayerState, but when I try to Cast it to my custom class I get a null pointer.

like here
i’ve also set GameModeBase’s PlayerStateClass property to my custom class

This topic has been moved from International to Programming & Scripting: C++.

When posting, please review the categories to ensure your topic is posted in the most relevant space. Hopefully, this new category helps you to get an answer to your question.

In the meantime, good luck and happy developing :slight_smile: