I’m working on a turn based game and using AGameState quite heavily both for the game state and multiplayer replication.
I’m working on a minimax-ish bot algorithm that tries a number of plays and selects one based on its calculated fitness. This requires me to modify the game state a lot since the bot simulates the play up to the game’s end.
I can’t seem to create a new instance of AGameState without the game crashing however.
NewObject fails with Cast of Package /Engine/Transient to Level failed during a tick.
SpawnActor actually replaces the previous AGameState which isn’t what I want.
Is there a way to get a temporary AGameState?