Game Instance


1 Overview

This document will explain how to setup the game instance based our framework. As game instance is the singleton class, we use this class to manage all other singleton class, such view manager, event manager.


2 Basic Setup

Create child blueprint class of BP_GameInstance_USG as following example:

  • /Game/USGT/Game/CoreModules/GameInstance/BP_GameInstance_Core

pawnsetup

Modify the properties under the category “USG Config” according to your requirement.

Setup the game instance class from the project setting.

pawnsetup


3 View Manager

View manager class will manage all ui instance. For example, use the following functions to show and hide loading screen widget.

loadingscreen


4 Event Manager

Event manager class is designed to manage all global events. As a singleton class and the instance is created with the game instance, you can use it anywhere directly. It is more convenient than that you define the events in different actor or component blueprints, because you don’t need to find these objects before binding or broadcasting events. Another benefit is that you can manage all events inside one class.