Order of events while starting the game

Guide for people who don't read C++, explaining what happens

Updated about 4 years ago Edit Page Revisions

Explain more events...

  • Game Instance::StartPlayInEditorGameInstance calls UWorld::BeginPlay.

  • UWorld::BeginPlay

    • GameMode->StartPlay()

      • AGameStateBase::HandleBeginPlay()

        • GetWorldSettings()->NotifyBeginPlay()

        • GetWorldSettings()->NotifyMatchStarted()

      • AWorldSettings::NotifyBeginPlay()

        • This calls BeginPlay on the actors currently existing in the world. Orden of called actors is unknown, we can't never rely on Actor X calling BeginPlay before Actor Y.
    • GetAISystem()->StartPlay()

    • OnWorldBeginPlay.Broadcast()

    • PhysicsScene->OnWorldBeginPlay()