So, VRC networking 1.0.1:
Almost everything is client side, until you tell the client to start syncing stuff with other users.
For my world “know your friends in space” I wanted to make it so the board game syncs the text that’s on the board with other players.
To achieve this, you’ll need 3 things.
- A parameter that you’ll synchronize. (This’ll be a string in your case)
- A parameter to indicate the local un-synced state of the object. After all, if it’s not out of sync, we don’t need to start an update routine.
- A routine to tell the users to re-sync with the master.
for U# it’d look something like this:
public string syncedText; //The string we'll be syncing across the network
private string internalState; //The internal state of our object
public InputField inputField; //The UI field we want to update.
public void FixedUpdate() //Fixed updates are run at a fixed moment, so they're not affected by lag.
if(internalState != syncedText) //Check if our internal state matches the same state the master is at. if not update.
internalState = syncedText;
inputField.text = syncedText;
RequestSerialization(); //We were out of sync with the master. It might be a good idea to tell everyone else to check themselves if they were out of sync.
//This is called from the input field itself to indicate it updated. Sync this across the network.
public void OnValueChanged()
syncedText = inputField.text;
RequestSerialization(); //Tell other players the text updated.
//Some one joined, let's go ahead and make it so they get to see the updated text.
public override void OnPlayerJoined(VRCPlayerApi player)
In terms of udon graph it’d be something like this: