Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Send big data from Host to Clients

Discussion in 'Netcode for GameObjects' started by boyaregames, Jun 24, 2021.

  1. boyaregames

    boyaregames

    Joined:
    Jun 23, 2021
    Posts:
    2
    Hello!
    I am making a local multiplayer and i need to send from host to the clients an Image(JPG).
    All needed data of the game exist only on a Host side (just strings, images)
    I cannot do that via Rpc cuz of packet limitation. So how to do that?
    (Sorry for bad english)
     
  2. Saulotti

    Saulotti

    Joined:
    Oct 20, 2009
    Posts:
    14
    I'm also looking for an answer on this. Using MLAPI.

    Edit:
    What I did so far: I've created a Coroutine in my server to send a small chunk of the data each update cycle, considering the limit of 1500 bytes per RPC call. I'm sending roughly 1200 per RPC per call.

    Considering that I just do this once the player have just connected, while loading the level, and the information is not crucial for the gameplay, I don't think it will be a problem for the player to see the content loading through 1 or 2 seconds.
     
    Last edited: Sep 17, 2021 at 4:10 PM
unityunity