Photon Networking: Object observing itself won't read with OnPhotonSerializeView

Hello, I’m having an issue that I can’t seem to understand.

I am trying to have any changes in a player’s UI RectTransform show for other players on the network. The way that I have it set up, the scene’s Canvas has my script (NetworkMeleeShipPickController) and a PhotonView that is observing its own NetworkMeleeShipPickController script. (See the following image.)

Within my NetworkMeleeShipPickController script it has OnPhotonSerializeView that is set to write and read data about a playerID that I assigned the player and the anchor positions of the it’s specific RectTransform (which is stored in an array). I have the log set to report when it is writing and when it is reading, and even with multiple players in the same room and scene the Console confirms that it is only writing, and never reading. (See code)

  • void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) {
  • if (stream.isWriting) { //We are sending info.
  • Debug.Log(“WritingData”);
  • stream.SendNext(myPlayerID);
  • stream.SendNext(selectorRect[myPlayerID].anchorMax);
  • stream.SendNext(selectorRect[myPlayerID].anchorMin);
  • }
  • else { //We are receiving info.
  • Debug.Log(“ReadingData”);
  • int receivedID = (int)stream.ReceiveNext();
  • selectorRect[receivedID].anchorMax = (Vector2)stream.ReceiveNext();
  • selectorRect[receivedID].anchorMin = (Vector2)stream.ReceiveNext();
  • }
  • }

I figured it out, you must have multiple objects send data to each other.

im still struggling with this problem, would you be willing to help me through this?