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. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Question What's the best way to pass info from Host/Server to a Client?

Discussion in 'Netcode for GameObjects' started by GuirieSanchez, Dec 11, 2022.

  1. GuirieSanchez

    GuirieSanchez

    Joined:
    Oct 12, 2021
    Posts:
    363
    Imagine I want to set +50 parameters from the server to a client (it'd include multiple types: bools, ints, floats, vectors, etc.). What would be the best practice to accomplish this?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    2,454
    ClientRpc with custom INetworkSerializable struct.
     
  3. GuirieSanchez

    GuirieSanchez

    Joined:
    Oct 12, 2021
    Posts:
    363
    Hi @CodeSmile, thanks for answering. Could you provide a little example of it?