- Home /
How to save and load the game of the corresponding player by Serialization
Here after several days of research, I come to ask for help!
I created a menu where the player has to choose his nickname.
So that several players can play with their own backup. Unfortunately I did not find a lot of info on this problem... Aside from a little idea thanks to Aldonaletto, but since it's not by playerPrefs that I use it's a bit problematic...
I already have my script for backup and creation of 3 users maximum... (although I would like to find a way to create more users, but I can't get them backed up in my backup file if i user fonction instatiate...)
Here's an example:
Here the username"John" was written via "InputField" and therefore a button with his name appeared.
Now I would like to from in button creates, that all the backups concern the username "John" is save.
and also for "Michael" any backups that concerns him...
I could make it work by writing three variable of each player, but that means I have to do a double job!
For example: instead of having a variable "int life = 0" for the 3 nicks I should do everything in three times.
That is to say:
"int lifePseudo1 = 0"
"Int lifePseudo2 = 0"
"Int lifePseudo3 = 0"
This is if there is a way to avoid a double job I'm curious to know the method!
Thanks in advance for your help to soon!
Answer by Giannigiardinelli · Mar 08, 2018 at 11:16 AM
No one can help me please?
I would like to create several users as on the example write above and record the evolution of each player through their creation of their pseudo meaning do a double recording work...
I made an example for a better understanding: What I have done now that gives a double job:
what I would like to achieve, but not find solutions to save time:
Thanks in advance