Show / Hide Table of Contents

Class GameInstance

GameInstance: high-level manager object for an instance of the running game.

Inheritance
System.Object
UObject
GameInstance
DotNetGameInstance
PlatformGameInstance
Inherited Members
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class GameInstance : UObject
Remarks

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 Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static GameInstance DefaultObject { get; }
Property Value
Type Description
GameInstance
| Improve this Doc View Source

LocalPlayers

List of locally participating players in this game instance

Declaration
public ObjectArrayField<LocalPlayer> LocalPlayers { get; }
Property Value
Type Description
ObjectArrayField<LocalPlayer>
| Improve this Doc View Source

OnlineSession

Class to manage online services

Declaration
public OnlineSession OnlineSession { get; set; }
Property Value
Type Description
OnlineSession
| Improve this Doc View Source

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>
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

New(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 Source

HandleNetworkError

Opportunity for blueprints to handle network errors.

Declaration
public event GameInstance.HandleNetworkError_delegate HandleNetworkError
Event Type
Type Description
GameInstance.HandleNetworkError_delegate
| Improve this Doc View Source

HandleTravelError

Opportunity for blueprints to handle travel errors.

Declaration
public event GameInstance.HandleTravelError_delegate HandleTravelError
Event Type
Type Description
GameInstance.HandleTravelError_delegate
| Improve this Doc View Source

ReceiveInit

Opportunity for blueprints to handle the game instance being initialized.

Declaration
public event GameInstance.ReceiveInit_delegate ReceiveInit
Event Type
Type Description
GameInstance.ReceiveInit_delegate
| Improve this Doc View Source

ReceiveShutdown

Opportunity for blueprints to handle the game instance being shutdown.

Declaration
public event GameInstance.ReceiveShutdown_delegate ReceiveShutdown
Event Type
Type Description
GameInstance.ReceiveShutdown_delegate

Operators

| Improve this Doc View Source

Implicit(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
  • Improve this Doc
  • View Source
Back to top Generated by DocFX