unreal.GameInstance

class unreal.GameInstance(outer=None, name='None')

Bases: unreal.Object

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.

C++ Source:

  • Module: Engine

  • File: GameInstance.h

Editor Properties: (see get_editor_property/set_editor_property)

  • on_pawn_controller_changed_delegates (OnPawnControllerChanged): [Read-Write] 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

handle_network_error(failure_type, is_server)None

Opportunity for blueprints to handle network errors.

Parameters
handle_travel_error(failure_type)None

Opportunity for blueprints to handle travel errors.

Parameters

failure_type (TravelFailure) –

property on_pawn_controller_changed_delegates

[Read-Write] 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

Type

(OnPawnControllerChanged)

receive_init()None

Opportunity for blueprints to handle the game instance being initialized.

receive_shutdown()None

Opportunity for blueprints to handle the game instance being shutdown.