#pragma once #include "CoreMinimal.h" #include "Engine/GameInstance.h" #include "OnlineSampleGameInstance.generated.h" // Forward Declare classes class AOnlineSamplePlayerController; class UObject; DECLARE_LOG_CATEGORY_EXTERN(LogGameInstance, Log, All); /** * Custom Game Instance Class to manage Game Instance subsystem */ UCLASS() class ONLINESAMPLE_API UOnlineSampleGameInstance : public UGameInstance { GENERATED_BODY() protected: /** Called to initialize game instance on game startup */ virtual void Init() override; /** Called to shutdown game instance on game exit */ virtual void Shutdown() override; public: /** Called to initialize game instance object */ UOnlineSampleGameInstance(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); /** Called to retrieve the primary player controller */ AOnlineSamplePlayerController* GetPrimaryPlayerController() const; };