Search Unity

Question Question regarding authentication user Identity, and unstable internet and Cloud Save

Discussion in 'Cloud Save' started by rpuls, Aug 13, 2022.

  1. rpuls

    rpuls

    Joined:
    Feb 3, 2017
    Posts:
    101
    Hello there, I'm very excited to get started with UGS, my project have been stalled for 2 years because we were facing google play service issues, but UGS looks promising and have revived our hope. However, I have a few questions that I can't find the answer to when I looked in the documentation;

    1: Authentication - how does the user know their "credentials" - when it was created secretly anonymously?
    "Anonymous access doesn't require the player to enter sign-in credentials or create a user profile"

    This is claimed to work cross device and even cross platform? But how is this possible?
    Use case: I open up mobile phone A and open the game for the first time, a PlayerID is created, I then open up phone B and open the game again. I would assume that a new PlayerID is generated again, unless magic is real and the service some how knows that the two phones belong to the same person.

    How do I allow a person to switch device but keep game progress?

    2: Cloud Save with unstable internet - are there any logic in place for retry request and fallback offline save? - or do I need to build this my self?

    Scenario: A user is authenticated and have completed a few levels, however, the internet connection is interrupted, but the game allow the user to keep playing. On each level completed the game tries to save progress but fails because there is no internet. Will Could Save try to resend these request later? And what happens if the app is closed and opened later again - will player progress be lost, or are there a fallback to offline save (pretended cloud save)?
     
    Last edited: Aug 14, 2022
  2. MileyUnity

    MileyUnity

    Joined:
    Jan 3, 2020
    Posts:
    92
    Hey there :)

    1. Yes, each device which signs in with a anonymous account will have a different ID, if you want to enable users to take their data from one device to the next you will need to ask them to sign in through one of their device/social accounts like Apple, Google Play Games, Facebook, Steam or a custom provider through OpenID ( https://docs.unity.com/authentication/AuthenticationApproaches.html ). You will be able to link a previously anonymous user ID to a persistent user ID through that and then your users can switch between devices whilst retaining the same data.

    2. This is unfortunately not available yet, the SDK will attempt to send the data over a couple times before giving up but once it does there's no offline storage yet. There's no ETA on when we will be able to start working on this as the team is currently fully focused on a different project. For now it's best to create this yourself.
     
  3. rpuls

    rpuls

    Joined:
    Feb 3, 2017
    Posts:
    101
    1. Thanks, this was exactly what I was looking for :)

    2. Okay! Thanks a lot for the direct answer, and I really appreciate the transparency about where the focus is. I will make an implementation my self for now.
     
    Rabadash8820 and MileyUnity like this.
  4. coladeu

    coladeu

    Joined:
    Nov 1, 2022
    Posts:
    2
    Hi Miley,
    I also try to figure out how cloud save works with social login and I have a question regarding this part of your answer. How do the linking user work? Will I have to make a function that will copy user data from one user to another?
     
  5. MileyUnity

    MileyUnity

    Joined:
    Jan 3, 2020
    Posts:
    92
    You can checkout the link I posted, that shows you how to connect your account ids to social accounts, the rest is unchanged and there's no need to transfer any data
     
  6. Rabadash8820

    Rabadash8820

    Joined:
    Aug 20, 2015
    Posts:
    94
    @MileyUnity Thanks for the answers above. Is there any update on offline storage of Cloud Save data? Perhaps a public roadmap where we can see what the team has planned with ETAs?
     
  7. francoisjjunity

    francoisjjunity

    Unity Technologies

    Joined:
    Nov 23, 2020
    Posts:
    40
    Hi Rabadash8820,

    We are actively looking into an offline storage solution for Cloud Save. We do not have an ETA right now unfortunately. If you need an immediate solution, you could look into saving data to PlayerPrefs first and then writing that data to Cloud Save once the internet connection is restored.

    Keep an eye out for future Cloud Save announcements in this forum.
     
    dinindu_d and Rabadash8820 like this.
  8. JVimes

    JVimes

    Joined:
    Jan 3, 2022
    Posts:
    10
    I'm also interested in cloud save with offline storage. Will be keeping an eye out.