Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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:
    453
    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:
    6,528
    ClientRpc with custom INetworkSerializable struct.
     
  3. GuirieSanchez

    GuirieSanchez

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