My function apparently is not working. I searched the forum and nothing helped.
My photon view looks like this:
![]()
I already moved Observe option.
I have already made changes and test to change the observer to the object but it did not help.
My photon view looks like this:

I already moved Observe option.
I have already made changes and test to change the observer to the object but it did not help.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(PhotonView))]
public class NetworkPath : Photon.MonoBehaviour
{
public void Update()
{
if (!photonView.isMine)
{
return;
}
}
void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.isWriting) //Enviar
{
stream.SendNext(transform.position);
}
else
{ //Receber
this.transform.position = (Vector3)stream.ReceiveNext();
}
}
}
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(PhotonView))]
public class NetworkPath : Photon.MonoBehaviour
{
public void Update()
{
if (!photonView.isMine)
{
return;
}
}
void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
{
if (stream.isWriting) //Enviar
{
stream.SendNext(transform.position);
}
else
{ //Receber
this.transform.position = (Vector3)stream.ReceiveNext();
}
}
}