Class GameInstance
GameInstance: high-level manager object for an instance of the running game.
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class GameInstance : UObjectRemarks
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.
Properties
| Improve this Doc View SourceDefaultObject
Get UE4 Default Object for this Class
Declaration
public static GameInstance DefaultObject { get; }Property Value
| Type | Description | 
|---|---|
| GameInstance | 
LocalPlayers
List of locally participating players in this game instance
Declaration
public ObjectArrayField<LocalPlayer> LocalPlayers { get; }Property Value
| Type | Description | 
|---|---|
| ObjectArrayField<LocalPlayer> | 
OnlineSession
Class to manage online services
Declaration
public OnlineSession OnlineSession { get; set; }Property Value
| Type | Description | 
|---|---|
| OnlineSession | 
ReferencedObjects
List of objects that are being kept alive by this game instance. Stored as array for fast iteration, should not be modified every frame
Declaration
public ObjectArrayField<UObject> ReferencedObjects { get; }Property Value
| Type | Description | 
|---|---|
| ObjectArrayField<UObject> | 
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }Property Value
| Type | Description | 
|---|---|
| Class | 
Methods
| Improve this Doc View SourceNew(UObject, Name)
Spawn an object of this class
Declaration
public static GameInstance New(UObject obj = null, Name name = default(Name))Parameters
| Type | Name | Description | 
|---|---|---|
| UObject | obj | |
| Name | name | 
Returns
| Type | Description | 
|---|---|
| GameInstance | 
Events
| Improve this Doc View SourceHandleNetworkError
Opportunity for blueprints to handle network errors.
Declaration
public event GameInstance.HandleNetworkError_delegate HandleNetworkErrorEvent Type
| Type | Description | 
|---|---|
| GameInstance.HandleNetworkError_delegate | 
HandleTravelError
Opportunity for blueprints to handle travel errors.
Declaration
public event GameInstance.HandleTravelError_delegate HandleTravelErrorEvent Type
| Type | Description | 
|---|---|
| GameInstance.HandleTravelError_delegate | 
ReceiveInit
Opportunity for blueprints to handle the game instance being initialized.
Declaration
public event GameInstance.ReceiveInit_delegate ReceiveInitEvent Type
| Type | Description | 
|---|---|
| GameInstance.ReceiveInit_delegate | 
ReceiveShutdown
Opportunity for blueprints to handle the game instance being shutdown.
Declaration
public event GameInstance.ReceiveShutdown_delegate ReceiveShutdownEvent Type
| Type | Description | 
|---|---|
| GameInstance.ReceiveShutdown_delegate | 
Operators
| Improve this Doc View SourceImplicit(IntPtr to GameInstance)
Convert from IntPtr to UObject
Declaration
public static implicit operator GameInstance(IntPtr p)Parameters
| Type | Name | Description | 
|---|---|---|
| System.IntPtr | p | 
Returns
| Type | Description | 
|---|---|
| GameInstance |