Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Not clear what OnPhotonSerializeView does

$
0
0
Hallo

in all tutorials I see that an object sends data over the network and receives the data
for sync in the same method:

Code (csharp):
  1.  
  2. void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info){
  3.         if (stream.isWriting) {
  4.             stream.SendNext (transform.position);
  5.             stream.SendNext (transform.rotation);
  6.         } else {
  7.            
  8.             Debug.Log("never gets called ");
  9.            
  10.             //never gets called...
  11.  
  12.             transform.position =...
Not clear what OnPhotonSerializeView does

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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