Where would the main body of code rest?

We’re trying to figure out how unreal knows when to call particular code. Currently, we have some level building data that we want to run before the player starts. This could would figure out where things are placed and then spawn them into the world before the player ever sees anything on screen except perhaps a loading screen. We’ve found the world composition class to extend but now we’re trying to figure out what triggers this. Do we need to link it to an event in code? If there is some documentation on this feel free to drop a link down - there’s so much of it that we’re not sure if what we’re reading is what we need.

Thanks

check out UnrealEngine.cpp
UEngine::Init()

you could probably just make a default empty LoadingPawn that shows nothing but the loading screen on its hud, then when your done with your level building data, you can start the game by destroying that pawn and possessing your games real pawn. then you can set up a movement mode in your player controller for loading screens, just in case you want the player to be able to spin a random prop around like skyrim, or play a mini game while it loads.

You can try, in whatever class you are creating or calling the code in, to override the “Event Begin Play” by creating the protected function and overriding it as followed: “virtual void BeginPlay() override;”. What this does is calls before any of your blueprint events or actor spawns.