G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UGameInstance Class Reference

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. More...

Public Member Functions

Functions
ULocalPlayer FindLocalPlayerFromControllerId (int ControllerId) const
ULocalPlayer CreateLocalPlayer (int ControllerId, FString &OutError, bool bSpawnPlayerController)
ULocalPlayer CreateLocalPlayer (FPlatformUserId UserId, FString &OutError, bool bSpawnPlayerController)
int AddLocalPlayer (ULocalPlayer NewPlayer, FPlatformUserId UserId)
bool RemoveLocalPlayer (ULocalPlayer ExistingPlayer)
int GetNumLocalPlayers () const
ULocalPlayer GetLocalPlayerByIndex (int Index) const
APlayerController GetFirstLocalPlayerController (const UWorld World=nullptr) const
ULocalPlayer CreateInitialPlayer (FString &OutError)
ULocalPlayer FindLocalPlayerFromUniqueNetId (FUniqueNetIdRepl UniqueNetId) const
ULocalPlayer GetFirstGamePlayer () const
void HandleNetworkError (ENetworkFailure FailureType, bool bIsServer)
 Opportunity for blueprints to handle network errors.
void HandleTravelError (ETravelFailure FailureType)
 Opportunity for blueprints to handle travel errors.
void Init ()
 Opportunity for blueprints to handle the game instance being initialized.
void Shutdown ()
 Opportunity for blueprints to handle the game instance being shutdown.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

Variables
FOnUserInputDeviceConnectionChange OnInputDeviceConnectionChange
 Callback for when an input device connection state has changed (a new gamepad was connected or disconnected).
FOnUserInputDevicePairingChange OnUserInputDevicePairingChange
 Callback when an input device has changed pairings (the owning platform user has changed for that device).
const int NumLocalPlayers
const ULocalPlayer FirstGamePlayer
FOnPawnControllerChanged OnPawnControllerChangedDelegates
 gets triggered shortly after a pawn's controller is set. Most of the time it signals that the Controller has changed but in edge cases (like during replication) it might end up broadcasting the same pawn-controller pair more than once
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

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.

Member Function Documentation

◆ AddLocalPlayer()

int AddLocalPlayer ( ULocalPlayer NewPlayer,
FPlatformUserId UserId )

◆ CreateInitialPlayer()

ULocalPlayer CreateInitialPlayer ( FString & OutError)

◆ CreateLocalPlayer() [1/2]

ULocalPlayer CreateLocalPlayer ( FPlatformUserId UserId,
FString & OutError,
bool bSpawnPlayerController )

◆ CreateLocalPlayer() [2/2]

ULocalPlayer CreateLocalPlayer ( int ControllerId,
FString & OutError,
bool bSpawnPlayerController )

◆ FindLocalPlayerFromControllerId()

ULocalPlayer FindLocalPlayerFromControllerId ( int ControllerId) const

◆ FindLocalPlayerFromUniqueNetId()

ULocalPlayer FindLocalPlayerFromUniqueNetId ( FUniqueNetIdRepl UniqueNetId) const

◆ GetFirstGamePlayer()

ULocalPlayer GetFirstGamePlayer ( ) const

◆ GetFirstLocalPlayerController()

APlayerController GetFirstLocalPlayerController ( const UWorld World = nullptr) const

◆ GetLocalPlayerByIndex()

ULocalPlayer GetLocalPlayerByIndex ( int Index) const

◆ GetNumLocalPlayers()

int GetNumLocalPlayers ( ) const

◆ HandleNetworkError()

void HandleNetworkError ( ENetworkFailure FailureType,
bool bIsServer )

Opportunity for blueprints to handle network errors.

◆ HandleTravelError()

void HandleTravelError ( ETravelFailure FailureType)

Opportunity for blueprints to handle travel errors.

◆ Init()

void Init ( )

Opportunity for blueprints to handle the game instance being initialized.

◆ RemoveLocalPlayer()

bool RemoveLocalPlayer ( ULocalPlayer ExistingPlayer)

◆ Shutdown()

void Shutdown ( )

Opportunity for blueprints to handle the game instance being shutdown.

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ FirstGamePlayer

const ULocalPlayer FirstGamePlayer

◆ NumLocalPlayers

const int NumLocalPlayers

◆ OnInputDeviceConnectionChange

FOnUserInputDeviceConnectionChange OnInputDeviceConnectionChange

Callback for when an input device connection state has changed (a new gamepad was connected or disconnected).

◆ OnPawnControllerChangedDelegates

FOnPawnControllerChanged OnPawnControllerChangedDelegates

gets triggered shortly after a pawn's controller is set. Most of the time it signals that the Controller has changed but in edge cases (like during replication) it might end up broadcasting the same pawn-controller pair more than once

◆ OnUserInputDevicePairingChange

FOnUserInputDevicePairingChange OnUserInputDevicePairingChange

Callback when an input device has changed pairings (the owning platform user has changed for that device).