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.

Question Single Server - Multiple single players on a server

Discussion in 'Dedicated Server' started by zardtomcat, Aug 25, 2023.

  1. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    Hello,

    I am trying to figure out how to support multiple users on a single server, where each user can only see their own assets (but not everybody else's asset). I may use a separate scene for each or a single large scene where they are separated from each other.

    I have checked the forum but not having much luck. Does anybody know how this can be done? I use visual scripting, so any example that supports it would be great.

    Thanks
     
  2. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    237
    Hello!

    I think it depends on what's the kind of data you want to share between the Server and the Clients.
    So what's the data the Server needs to know from the users and what's the data the Clients need to know from the Server?
     
  3. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    Imagine it as a number of single player worlds. Users see thier assets (3d models) and walk around their own space. So each user needs to interact with their own assets.

    I have come across PUN2 and wondering if that package allows me to do this.
     
  4. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    Any suggestion as what is the best way forward?
     
  5. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    237
    So for what I understand, you don't need to synchronize real time data between server and clients.

    Looks like it would be just fine to keep and manage the persistent state of the world for each individual player? If that's the case you might want to explore the option to have one database the user connect only to update their states.
     
  6. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    That is correct. I don't have any real time synchronisation. Are there any tutorials on how to create a server with authenticatio/user login? I use visual scripting so any pointers to tutorials using VS would be great.
     
  7. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    Any suggestions?
     
  8. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    237
  9. zardtomcat

    zardtomcat

    Joined:
    Jan 10, 2015
    Posts:
    17
    That would work. However we need to host it ourselves so wont be using UGS or other hosted solutions.