Replaces the current properties of a shared object with the values given in data.
The data is overwritten, not merged. All the existing properties on shared will be removed and the properties in data will replace them.
You can use this function to set all the properties of a shared object at once:
partySetShared( shared, {x:10, y:10, z:10});
You can use this function to quickly clear a shared object:
partySetShared( shared, {});
partySetShared(shared, data)
sharedObject: a shared object
dataObject: data to write to shared
nothing
Q: Can i use shared = {} instead of partySetShared(shared, {}) ?
A: Those code snippets do very different things. See Don’t Reassign Shared Variables