Hello,
I am quite new to photon PUN so sorry if this question sounds redundant!
I wanted to know if there is any difference in the way data is sent between using the Photon Transform View component on a gameobject and implementing the OnPhotonSerializeView method in a script on that gameobject to send the position.
For instance if I was to use the Photon Transform View to send the position of the player would it be any different from doing this?:
Any difference in terms of performance and bandiwth limitation over the photon cloud server? Is one aproach 'right' and the other 'wrong' for some reason?
I am quite new to photon PUN so sorry if this question sounds redundant!
I wanted to know if there is any difference in the way data is sent between using the Photon Transform View component on a gameobject and implementing the OnPhotonSerializeView method in a script on that gameobject to send the position.
For instance if I was to use the Photon Transform View to send the position of the player would it be any different from doing this?:
#region IPunObservable implementation public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) { if (stream.IsWriting) { // We own this player: send the others our data stream.SendNext(gameobject.transform.position); } else { // Network player, receive data gameobject.transform.position = (Vector3)stream.ReceiveNext(); } } #endregion
Any difference in terms of performance and bandiwth limitation over the photon cloud server? Is one aproach 'right' and the other 'wrong' for some reason?