Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

OnPhotonSerializeView() issue ? Not working with two variables

$
0
0
i am working on a multiplayer game using photon. i am streaming the data using using OnPhotonSerializeView everything is working fine for one variable. like if (stream.IsWriting) { stream.SendNext(carController.BrakeInput); } else if(stream.IsReading) { carController.BrakeInput = (float)stream.ReceiveNext(); } but when I use 2 variables then it gives the error - not working anymore if (stream.IsWriting) { stream.SendNext(carController.BrakeInput); stream.SendNext(carController.skidding); } else if(stream.IsReading) { carController.BrakeInput = (float)stream.ReceiveNext(); carController.skidding = (bool)stream.ReceiveNext(); }

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>