OnPhotonSerializeView not working

Hi, ive been using.
OnPhotonSerializeView() function.
but it looks like its not working propetly, I did a print inside the function before the stream.isWtriting
but nothing prints.
is there a pipeline I miss to make it work?

here is my code its really nothing weird. C#

void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info){
print("im working");
if( stream.isWriting){
stream.SendNext(transform.position);
}
else{
positionnet = (Vector3)stream.ReceiveNext();
}
}

Comments

  • Hi,

    Did you add this script to components observed by PhotonView?
  • yeahhh looks like that was te problem, I was observing the component in the wrong photon view, sorry XD
  • @vadim
    After searching half the day for the problem, I cant believe it was such a simple fix. Cheers