AGameModeBase::InitGame

Initialize the game.

Windows
MacOS
Linux

Warnings

  • this is called before actors' PreInitializeComponents.

Override Hierarchy

AGameModeBase::InitGame()

AGameMode::InitGame()

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/GameModeBase.h

Include

#include "GameFramework/GameModeBase.h"

Source

/Engine/Source/Runtime/Engine/Private/GameModeBase.cpp

Syntax

virtual void InitGame
(
    const FString & MapName,
    const FString & Options,
    FString & ErrorMessage
)

Remarks

Initialize the game. The GameMode's InitGame() event is called before any other functions (including PreInitializeComponents() ) and is used by the GameMode to initialize parameters and spawn its helper classes.

: this is called before actors' PreInitializeComponents.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss