Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Question How can the server in a Relay alter the values of other player's cloud save data?

Discussion in 'Cloud Code' started by DanishSinha, Dec 8, 2022.

  1. DanishSinha

    DanishSinha

    Joined:
    Nov 9, 2016
    Posts:
    18
    I don't want to exactly use this method but here's my logic:

    We have a board game. After each move the Server checks if someone has won the game. Once that returns true, the server sends a cloud code execution request. The cloud code adds currency X to the winning player and deducts some from the losing players.

    The problem with this method is, of course, player A can't access/alter the currency amounts of other players.

    How should I go about doing this so it is the most cheat-proof?

    Bonus question: Any ETA on when we'll be able to access other players' values?
     
  2. MileyUnity

    MileyUnity

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    92
    DanishSinha likes this.
  3. DanishSinha

    DanishSinha

    Joined:
    Nov 9, 2016
    Posts:
    18
    Awesome, exactly what I was looking for. Thanks!
    A side question, do you also have any docs on encrypting the data you send between the devices and cloud code? Maybe you don't want to be sending the playerID as a simple string but rather in some encrypted format and decrypt it on the Cloud Code end. Concerned about the processing this will take on the latter but still curious.
     
  4. MileyUnity

    MileyUnity

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    92
    Currently the encryption only happens over the HTTPS connection between the client and services, other than that the data is send in plain text and we don't yet offer any extra encryption methods, this is something you should handle yourself for the time being but I'll raise it internally at least

    Edit:

    CloudSave data is at least stored in an encrypted way already :)
     
    Last edited: Dec 12, 2022
    DanishSinha likes this.