During cooking (during BuildCookRun), our maps are loaded, cooked, and saved out. Some of our maps, however, have code which programmatically includes other levels as sublevels. These maps are nearly empty in their natural form. They have some basic code in the level blueprint to configure something in our GameState class (in C++). Once the match is waiting to start, our GameState class uses this configuration to generate a map (by loading levels) using the configuration. I’d like to skip doing this when cooking.
I can tell our code is getting called (because I have some logging code in there and it shows up in the build log). Our code is in HandleMatchisWaitingToStart and HandleMatchHasStarted. So it appears they get called during cooking.
Is there some global state that I can check to determine that cooking is happening? I had hoped that IsRunningCommandlet() would work, but it seems to be false.