PhotonTransformView need implement OnPhotonSerializeView method?

Options
Hi,

I was using the OnPhotonSerializeView method for syncronize moviment of my player in my 2D game, now i look for PhotonTransformView for do it, but i'm geting this error:



This not make sense for me, i see the example scripts of PUN and they didn't implement the OnPhotonSerializeView. Below is my inspector setup, it's wrong?



In this case i want to sync only rotation of one weapon.

Thanks for support and for nice network framework!

Comments

  • Tobias
    Options
    If you want to put a script in the "observed" field of a PhotonView, then you need OnPhotonSerializeView.
    In other words: All scripts that get observed will need OnPhotonSerializeView.
    The PhotonTransformView implements it.

    "i see the example scripts of PUN and they didn't implement the OnPhotonSerializeView"
    Which script do you refer to?
  • Hello Tobias,

    Thanks for reply, i'm putting the PhotonTransformVIew in the observed component, not my custom script, the example is the demo 2D that come with the photon.

    Regards,

    Marangoni
  • Tobias,

    It was a build bug, unity continued to observe my old script that i had removed the OnPhotonSerializeView and not the PhotonTransformView that i put in the observed component, sorry for invalid topic and thanks for support.