Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Giannigiardinelli · Mar 06, 2018 at 10:33 PM · serializationsaveloaddatausername

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...


link text


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:

alt text


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!

pseudo-save.jpg (10.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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:

alt text what I would like to achieve, but not find solutions to save time: alt text

Thanks in advance


tutoexemple2.jpg (41.3 kB)
tutoexemple.jpg (50.3 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

80 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Error when loading saved date : SerializationException: End of Stream encountered before parsing was completed. 2 Answers

Serializer.Resume() not working for multiple levels 0 Answers

Serializer deletes saved info on game restart 1 Answer

My save function saves the wrong values!! 1 Answer

Coding help: How to use xml serialization 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges