How to stored the session duration ( seconds ) inside Map variable in gameinstance?

I created this function in gameinstance Blueprint, since I want it to store the data across the levels, but it doesn’t work as I expected.

and I call this event on Level BP’s BeginPlay, with Timer by Event.

It can store the time float based on the level name in the Map variable, but after switches the level, the Map variable seems reset to 0, instead of keeping the value it stored before.


the value before switches the level.


the value after switches the level, overwrite the previous data.

What might cause this? Do I need to do another save logic before the Open Level ( by Name )?

some quick updates :

I tried to add the New Total Time Directly, and the value does stored after the level switches, but it brings other issue :

the values stacks up like ( 1+2+3+4… ) instead of ( 1+1+1+1… ), so how to fix this?