Issues with OnPhotonSerializeView
Hello!
I'll cut straight to the chase. I'm having a problem with OnPhotonSerializeView as it as I understand it, should be called a few times per second. However it doesn't seem to get called at all. I've got the IPunObservable as script type aswell as MonobehaviourPunCallbacks and it just won't work. I don't know what to do and I need this to work to be able to continue with my work.
Thanks in advance!
I'll cut straight to the chase. I'm having a problem with OnPhotonSerializeView as it as I understand it, should be called a few times per second. However it doesn't seem to get called at all. I've got the IPunObservable as script type aswell as MonobehaviourPunCallbacks and it just won't work. I don't know what to do and I need this to work to be able to continue with my work.
Thanks in advance!
0
Comments
Does the GameObject you're syncing have a PhotonView, and is it identifying your script as a component to sync? Showing how you implemented OnPhotonSerializeView might help too
Should there be a photonview component on the same object as the script then? If that's the case that could well be the problem but I'll paste my entire script here aswell.
Thanks for the response!
Found the problem.
Apparently OnPhotonSerializeView isn't called if there aren't two players in a room and as I only tested with one player it didn't get called. Also seems I forgot a photonView component as you mentioned.
Thanks for everything!