I have a custom class (ALevelGameState) that is a child of AGameState. I’ve added a couple methods and one property for tracking player points and I’d like to run unit tests on them using the automation tab in session frontend (or anyway to run unit tests…). I’ve setup the simple test using IMPLEMENT_SIMPLE_AUTOMATION_TEST like in the automation tech guide. However anytime I try to create an ALevelGameState object and call my getScore() method, using something like I did in my custom gamemode class, I get read reference errors at runtime. Is there a special setup or dependencies I also need to create in order to unit test my custom gamestate? I noticed that AGameMode calls: GameState = GetWorld()->SpawnActor(GameStateClass, SpawnInfo);. Do I have to launch a game and a map in order to test with gamestate, or any actor related class?
This may also be due to my limited C++ knowledge instead of something UE specific. So I’m not sure which topic to search.