What does the main() function do

I think main() is the broad equivalent of Start() in Unity. It is the default method called when the program is loaded. In this case, it contains the game loop - setting the initial difficulty and looping through the game until we get to the maximum setting, then exiting cleanly.

1 Like

Hi there.

Main could be compared to Start but is not quite the same thing. There’s only a single main in any application however and if I recall, Start exists in almost every C# class for Unity. When you come to working in Unreal, it’s more like the BeginPlay method in a C++ class for Unreal.

I hope this helps

1 Like