Connection from MasterClient to clients not working

Since yesterday when I try to run an RPC from the MasterClient to All it doesn't do anything and i can't seem to figure why.

To give you a context of how my interaction between the Masterclient and All clients, I have a sequence minigame, where the player has the 4 directional arrows (up, right, down, left) and he has to press them in the order shown in the sequence.
Step-by-step:
- Client 1 clicks on the minigame
- RPC from Client 1 to All clients to open the minigame window
- RPC from Client 1 to the Master Client to generate a sequence (to ensure that all clients see the same sequence)
- RPC from the Master Client to All clients with the generated sequence to create the minigame(This is the one that stopped working out of nowhere)

Also whenever two clients connect the console just fills up with the error quoted below.

"NullReferenceException: Object reference not set to an instance of an object
PhotonTransformView.OnPhotonSerializeView (.PhotonStream stream, PhotonMessageInfo info) (at Assets/Plugins/Photon/Photon Unity Networking/Plugins/PhotonNetwork/Views/PhotonTransformView.cs:123)
PhotonView.ExecuteComponentOnSerialize (UnityEngine.Component component, .PhotonStream stream, PhotonMessageInfo info) (at Assets/Plugins/Photon/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:532)
PhotonView.SerializeComponent (UnityEngine.Component component, .PhotonStream stream, PhotonMessageInfo info) (at Assets/Plugins/Photon/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:457)
PhotonView.SerializeView (.PhotonStream stream, PhotonMessageInfo info) (at Assets/Plugins/Photon/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:352)
NetworkingPeer.OnSerializeWrite (.PhotonView view) (at Assets/Plugins/Photon/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:4092)
NetworkingPeer.RunViewUpdate () (at Assets/Plugins/Photon/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:3961)
PhotonHandler.Update () (at Assets/Plugins/Photon/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:164)"

Anyone has a clue why this is happening? Is it happening to anyone else?

Comments

  • [Deleted User]
    edited May 2018
    Hi @DSousa,

    - RPC from the Master Client to All clients with the generated sequence to create the minigame(This is the one that stopped working out of nowhere)


    If it has stopped out of nowhere, I assume it was working before, wasn't it? Can you check if the RPC get sent by the MasterClient? If so, can you check if it is received by the other clients? Is there any error logged to the console?

    Also whenever two clients connect the console just fills up with the error quoted below.


    Please check by debugging if this.m_PositionControl (PhotonTransformView.cs:123) is properly set. If not please also check if PhotonTransformViewPositionControl.cs is in the project (included in the PUN package). If not, please try to import the PUN package again.

    Did you recently updated Unity or PUN? Can you tell us what versions of both you are currently using?
  • Hello @Christian_Simon ,

    Thank you for your feedback.
    I already found why it stopped working, it was a stupid mistake. We previously had a prefab for a door which was using Photon View and PhotonTransformView, and my college made a new model for the door and duplicated the old prefab and only changed the model, the reference on the Photon View that was reading the Transform View data was still pointing to the old prefab which was not even on the Scene. It took me a while to find the problem but I finally did.

    Thank you again for all the tips.

    Cheers.