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

Question Where do I store the data of a server-side NPC instance?

Discussion in 'Unity Gaming Services General Discussion' started by UnityUser8080, Apr 4, 2023.

  1. UnityUser8080

    UnityUser8080

    Joined:
    May 4, 2013
    Posts:
    5
    Hi, for my use case, I wanted to have a persistent, server-side NPC instance that multiple players can interact with. But I am not sure where to keep the NPC data (such as HP), or how to easily manage NPC instances (like a player manager).

    From what I understand, cloud save and economy resource instances are bound to the player. I was thinking about using Remote Config, but I'm not too sure if storing a massive JSON under a config to keep track of multiple instances of a NPC was the way to go.

    Any guidance is appreciated!
     
  2. UnityUser8080

    UnityUser8080

    Joined:
    May 4, 2013
    Posts:
    5
    If all fails, I wonder how viable it would be to use a dummy player to store data of a NPC instance? (or simply any server-side data to freely use through cloud code)
     
  3. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    You could look at using cloud code with economy and remote config with game overrides.
     
  4. devingunity

    devingunity

    Unity Technologies

    Joined:
    May 26, 2021
    Posts:
    20
    Hi UnityUser8080, we're actually currently working on adding capabilities for non-player data to Cloud Save! This is one of our team's top priorities at the moment, so hopefully we'll be able to give you an update on this functionality soon.
     
    UnityUser8080 and Julian-Unity3D like this.
  5. UnityUser8080

    UnityUser8080

    Joined:
    May 4, 2013
    Posts:
    5
    Thanks for the reply. Do you know if there would be a size limit (like the 5mb limit per player) on the non-player cloud save?