Download

Class to hold player variables through level changes?

Hello All,

I want to store some player variables in a way that doesn’t loose them as he/she changes levels or maps. For example I have a opening screen/level where they choose a game save then the next map/level where their character gets displayed for the first time. Where should I put the variables that define the play character so that they don’t get lost on map change?

GameInstance does persist through level changes but is meant to be only on the server and mine is a multiplayer game so that wouldn’t work on the local player client.

What is the way to do this?

EDIT: Trying to use GI for now and then I’ll solve sending the data for multiplayer later. Maybe it works fine if you do things in order.

Cheers
Fredrik