I am at the start of the second chapter of the Unreal c++ course, and I’ll answer a question about what the main function does. My answer is that the main function is starting our code. Everything we wrote inside functions is inserted there. The only code that is executed is located in the main function. To be more precise, in the course’s XXX game the main function is setting up the difficulty, then starts the game loop and ramps up the difficulty until this difficulty is above 10. What I also noticed is that you don’t actually fail, you just get the message about you failing, but the game goes on.
1 Like