Sync
Options
Hello,
I am working on a car multiplayer game which has small car customization , which includes changing material. i wanted to know which is the best way i can sync every property of material of every player
I am working on a car multiplayer game which has small car customization , which includes changing material. i wanted to know which is the best way i can sync every property of material of every player
0
Comments
-
Hi @Romin,
you can either use RPCs for synchronizing certain properties (e.g.[PunRPC] void ChangeCarMaterial(...)
) or the OnPhotonSerializeView function whenever a client modifies his car. Please note that you can't synchronize materials directly but you can either sync the material's color as a Vector3 object or use an ID which is somehow assigned to a certain material.
To see how RPCs are working, I would recommend you taking a look at the RPCs and RaiseEvent documentation page.1