Sync game platforms

Options
Hello. I have platforms in my game like the ones in the picture below. I am creating the platforms randomly. However, they need to be identical(same position, length, type etc.) for each player in the same game room. How can I achieve this? Thank you.


Answers

  • vadim
    Options
    Hi,
    Create platforns on master client with PhotonNetwork.InstantiateSceneObject call. Synchronize platforms positions same way as you do so for characters. Other parameters could be updated with RPC each time they get changed (first time right after creation).
    For constantly changing parameters like position, OnPhotonSerializeView may be an option. Look at DemoWorker and MarcoPolo-Tutorial projects for OnPhotonSerializeView usage sample.