In all tutorials I see that an object sends data over the network and receives the data.
For sync in the same method:
Code:
void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info){
if (stream.isWriting) {
stream.SendNext (transform.position);
stream.SendNext (transform.rotation);
} else {
Debug.Log("never gets called ");
//never gets called...
transform.position = (Vector3)stream.ReceiveNext ();
transform.rotation = (Quaternion)stream.ReceiveNext ();
}
}
But when I test my code, the lower part, where the data gets received, is never executed!
I never see the logs. But the object is SYNCHED because it is set in the inspector:
But the problem is that the object is not interpolated so it looks kind of funny.
So, I need to know how can I make the upper method to work so I can do some interpolation stuff.