Hi,
I’m working on an idler game so I need to save variables whenever the player switches app (like he gets a message and switch to that app to answer). So once the player gets back in game, I load the saved variables and update them based on the time he spent on the another app.
I was quite happy to see that two nodes exist for that which are “Bind Event to Application Has Entered Foreground Delegate” and “Bind Event to Application Will Enter Background Delegate”.
And here’s what I did to test if this works :
I’m just using print string to see if that works.
The first time I launch the game, I see GAMEINSTANCE - LOAD, then i switch app, wait like 5 seconds and come back in game and then I see GAMEINSTANCE - LOAD and GAMEINSTANCE - SAVE, but, they both “disapear” at the same time meaning they’ve been fired at the same time (they both should last 20 seconds but the save message should have fired 5 seconds (or whatever time I spent in an other app) before.
Am I missing something here or using the wrong node ?
I tried to do that in Game Instance, Plateform Game Instance and Game mode, they’re all doing the same thing
Anyway, thanks in advance =)