| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Engine/GameInstance.h |
Include |
#include "Engine/GameInstance.h" |
GameInstance: high-level manager object for an instance of the running game. Spawned at game creation and not destroyed until game instance is shut down. Running as a standalone game, there will be one of these. Running in PIE (play-in-editor) will generate one of these per PIE instance.
Name | Description | ||
---|---|---|---|
|
LatentActionManager |
||
|
LocalPlayers |
List of locally participating players in this game instance |
|
|
NotifyPreClientTravelDelegates |
Listeners to PreClientTravel call |
|
|
UOnlineSession ... |
OnlineSession |
Class to manage online services |
|
OnLocalPlayerAddedEvent |
Local player access |
|
|
OnLocalPlayerRemovedEvent |
||
|
OnPlayTogetherEventReceivedDelegateHandle |
Handle for delegate for handling PS4 play together system events |
|
|
PIEMapName |
||
|
double |
PIEStartTime |
|
|
ReferencedObjects |
List of objects that are being kept alive by this game instance. |
|
|
FTimerManager &... |
TimerManager |
|
|
FWorldContext &... |
WorldContext |
Name | Description | |
---|---|---|
|
UGameInstance ( |
Name | Description | ||
---|---|---|---|
|
AddLocalPlayer ( |
Adds a LocalPlayer to the local and global list of Players. |
|
|
AddUserToReplay ( |
Adds a join-in-progress user to the set of users associated with the currently recording replay (if any) |
|
|
CleanupGameViewport() |
||
|
ClientTravelToSession |
Helper function for traveling to a session that has already been joined via the online platform Grabs the URL from the session info and travels |
|
|
AGameModeBas... |
CreateGameModeForURL |
Call to create the game mode for a given map URL |
|
ULocalPlayer... |
CreateInitialPlayer ( |
|
|
ULocalPlayer... |
CreateLocalPlayer |
Adds a new player. |
|
CreateMinimalNetRPCWorld |
Static util function used by InitializeForMinimalNetRPC and LoadMap to create the minimal world suitable for basic network RPC |
|
|
DebugCreatePlayer ( |
Debug console command to create a player. |
|
|
DebugRemovePlayer ( |
Debug console command to remove the player with a given controller ID. |
|
|
DelayPendingNetGameTravel() |
Return true to delay an otherwise ready-to-join PendingNetGame performing LoadMap() and finishing up useful to wait for content downloads, etc |
|
|
ULocalPlayer... |
FindLocalPlayerFromControllerId ( |
|
|
ULocalPlayer... |
FindLocalPlayerFromUniqueNetId ( |
|
|
ULocalPlayer... |
FindLocalPlayerFromUniqueNetId ( |
|
|
UEngine *... |
GetEngine() |
|
|
ULocalPlayer... |
GetFirstGamePlayer() |
|
|
APlayerContr... |
GetFirstLocalPlayerController ( |
|
|
UGameViewpor... |
GetGameViewportClient() |
|
|
FLatentActio... |
GetLatentActionManager() |
|
|
ULocalPlayer... |
GetLocalPlayerByIndex ( |
|
|
GetLocalPlayerIterator() |
||
|
const TArray... |
GetLocalPlayers() |
|
|
GetNumLocalPlayers() |
||
|
GetOnlinePlatformName() |
Retrieves the name of the online subsystem for the platform used by this instance. |
|
|
UOnlineSessi... |
GetOnlineSession() |
|
|
TSubclassOf<... |
GetOnlineSessionClass() |
|
|
APlayerContr... |
GetPrimaryPlayerController() |
Get the primary player controller on this machine (others are splitscreen children) (must have valid player state and unique id) |
|
TSharedPtr< ... |
GetPrimaryPlayerUniqueId() |
Get the unique id for the primary player on this machine (others are splitscreen children) |
|
TSubsystemCl... |
GetSubsystem() |
Get a Subsystem of specified type |
|
TSubsystemCl... |
GetSubsystem ( |
Get a Subsystem of specified type from the provided GameInstance returns nullptr if the Subsystem cannot be found or the GameInstance is null |
|
const TArray... |
GetSubsystemArray() |
Get all Subsystem of specified type, this is only necessary for interfaces that can have multiple implementations instanced at a time. |
|
UGameInstanc... |
GetSubsystemBase |
Get a Subsystem of specified type |
|
FTimerManage... |
GetTimerManager() |
|
|
UWorld * |
GetWorld() |
|
|
FWorldContex... |
GetWorldContext() |
|
|
HandleDemoPlaybackFailure ( |
Called when demo playback fails for any reason |
|
|
HandleDisconnectCommand ( |
||
|
HandleGameNetControlMessage ( |
Handle a game specific net control message (NMT_GameSpecific) this allows games to insert their own logic into the control channel the meaning of both data parameters is game-specific |
|
|
HandleNetworkError ( |
Opportunity for blueprints to handle network errors. |
|
|
HandleOpenCommand ( |
||
|
HandleReconnectCommand ( |
||
|
HandleTravelCommand ( |
||
|
HandleTravelError ( |
Opportunity for blueprints to handle travel errors. |
|
|
Init() |
Virtual function to allow custom GameInstances an opportunity to set up what it needs |
|
|
InitializeForMinimalNetRPC ( |
Called to initialize the game instance with a minimal world suitable for basic network RPC |
|
|
FGameInstanc... |
InitializeForPlayInEditor ( |
Called to initialize the game instance for PIE instances of the game |
|
InitializeStandalone |
Called to initialize the game instance for standalone instances of the game |
|
|
IsDedicatedServerInstance() |
Returns true if this instance is for a dedicated server world |
|
|
JoinSession ( |
||
|
JoinSession ( |
||
|
LoadComplete ( |
||
|
NotifyPreClientTravel ( |
Broadcast a notification that travel is occurring |
|
|
OnConsoleInput ( |
Delegate for handling external console commands |
|
|
FOnPreClient... |
OnNotifyPreClientTravel() |
|
|
OnPlayTogetherEventReceived ( |
Delegate for handling PS4 play together system events |
|
|
OnSeamlessTravelDuringReplay() |
This gets called when the player scrubs in a replay to a different level |
|
|
OnStart() |
Called when the game instance is started either normally or through PIE. |
|
|
OnWorldChanged |
Callback from the world context when the world changes |
|
|
TSubclassOf<... |
OverrideGameModeClass ( |
Return the game mode subclass to use for a given map, options, and portal. |
|
PlayReplay |
Start playing back a previously recorded replay. |
|
|
PlayReplayPlaylist ( |
Start playing back a playlist of previously recorded replays. |
|
|
FGameInstanc... |
PostCreateGameModeForPIE ( |
Called as soon as the game mode is spawned, to allow additional PIE setting validation prior to creating the local players / etc... |
|
PreloadContentForURL ( |
Call to preload any content before loading a map URL, used during seamless travel as well as map loading |
|
|
ReceivedNetworkEncryptionAck ( |
Called when a client receives the EncryptionAck control message from the server, will generally enable encryption. |
|
|
ReceivedNetworkEncryptionToken ( |
Handle setting up encryption keys. |
|
|
ReceiveInit() |
Opportunity for blueprints to handle the game instance being initialized. |
|
|
ReceiveShutdown() |
Opportunity for blueprints to handle the game instance being shutdown. |
|
|
RegisterReferencedObject ( |
Registers an object to keep alive as long as this game instance is alive |
|
|
RemoveLocalPlayer ( |
Removes a player. |
|
|
ReturnToMainMenu() |
Calls HandleDisconnect on either the OnlineSession if it exists or the engine, to cause a travel back to the default map. |
|
|
Shutdown() |
Virtual function to allow custom GameInstances an opportunity to do cleanup when shutting down |
|
|
StartGameInstance() |
Starts the GameInstance state machine running |
|
|
FGameInstanc... |
StartPlayInEditorGameInstance ( |
Called to actually start the game when doing Play/Simulate In Editor |
|
StartRecordingReplay |
Start recording a replay with the given custom name and friendly name. |
|
|
StopRecordingReplay() |
Stop recording a replay if one is currently in progress |
|
|
UnregisterReferencedObject ( |
Remove a referenced object, this will allow it to GC out |
Name | Description | ||
---|---|---|---|
|
FinishDestroy() |
Called to finish destroying the object. |
Name | Description | ||
---|---|---|---|
|
Exec ( |
Exec handler |
Name | Description | ||
---|---|---|---|
|
InitializePIE |
Please override InitializeForPIE instead |
|
|
StartPIEGameInstance ( |
Please override StartPlayInEditorGameInstance instead |