Local storage not unique per game?

Discussion and feedback on Construct 2

Post » Sun Feb 28, 2016 8:35 pm

In the manual states:

Different browsers use different storages, so data is not shared between different browsers on the same computer - each browser has its own unique storage.


I think it was unique per game as well before(?). Now I just checked my second game with debug mode and when I lookup the LocalStorage object, it contains data from my other game.

Is it a bug or should we always give some unique prefix per game? Or is it only an issue on localhost?
ImageImageImage
B
27
S
16
G
80
Posts: 1,015
Reputation: 44,749

Post » Sun Feb 28, 2016 8:46 pm

You should give it a unique key name.
On the other hand you can have different games share data that way.
Image ImageImage
B
169
S
50
G
174
Posts: 8,324
Reputation: 110,792

Post » Sun Feb 28, 2016 8:51 pm

Hmmm... that's actually a good news. Thanks newt! ;)
ImageImageImage
B
27
S
16
G
80
Posts: 1,015
Reputation: 44,749

Post » Mon Feb 29, 2016 5:52 am

I thought this was linked to the ID (ie. com.blah.game) in the project settings as well the Project Name?

I've had instances in the past, where I change those, and the LocalStorage is no longer accessible. But if I rename it back, it works and retrieves data ok.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Mon Feb 29, 2016 8:32 am

I know if you change the project name it will be a different save data. I use that to test stuff I don't want messing with my main save.
B
12
S
4
G
1
Posts: 137
Reputation: 1,519


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 21 guests