#include "OnlineSampleGameInstance.h" #include "OnlineSample/Player/OnlineSamplePlayerController.h" DEFINE_LOG_CATEGORY(LogGameInstance); /// <summary> /// Initialize Game Instance object /// </summary> void UOnlineSampleGameInstance::Init() { UE_LOG(LogGameInstance, Log, TEXT("OnlineSampleGameInstance initialized.")); Super::Init(); } /// <summary> /// Shutdown Game Instance object /// </summary> void UOnlineSampleGameInstance::Shutdown() { UE_LOG(LogGameInstance, Log, TEXT("OnlineSampleGameInstance shutdown.")); Super::Shutdown(); } /// <summary> /// Initialize Game Instance object /// </summary> /// <param name="ObjectInitializer"></param> UOnlineSampleGameInstance::UOnlineSampleGameInstance(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { } /// <summary> /// Retrieve a reference to the primary player controller /// </summary> /// <returns>AOnlineSamplePlayerController pointer</returns> AOnlineSamplePlayerController* UOnlineSampleGameInstance::GetPrimaryPlayerController() const { return Cast<AOnlineSamplePlayerController>(Super::GetPrimaryPlayerController(false)); }