August 2019
Intermediate to advanced
380 pages
9h 17m
English
Game Instance is not one of Common Classes, but it is important to know about the existence of this class. The Game Instance class and its data persist between Levels because an instance of the Game Instance class is created at the beginning of the game and is only removed when the game is closed.
All Actors and other objects in a Level are destroyed and respawned each time a Level is loaded. So, the Game Instance class is an option to use if you need to preserve some variable values in the Level transition.
To assign the Game Instance class for use in your game, modify the project's settings by going to Edit | Project Settings | Maps & Modes on the Level Editor, as shown in the following screenshot:
Read now
Unlock full access