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.

Resolved How to sync changes in NetworkObject for all players

Discussion in 'Netcode for GameObjects' started by bigassnoob, Dec 14, 2022.

  1. bigassnoob

    bigassnoob

    Joined:
    May 26, 2020
    Posts:
    7
    Hi, so if I spawn a NetworkObject it gets synced for all players, but if I then change something, like a mesh, it only happens locally. So my question is how do i sync these changes across the network?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    2,436
    That is what you use RPC messages for. You could also use a NetworkVariable that encodes an enum which indicates the mesh currently in use.
     
    bigassnoob likes this.
  3. bigassnoob

    bigassnoob

    Joined:
    May 26, 2020
    Posts:
    7
    thank you