InvalidCastException ViewTransform. Need help!

Options
InvalidCastException: Specified cast is not valid.
Photon.Pun.PhotonTransformView.OnPhotonSerializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformView.cs:87)
Photon.Pun.PhotonView.DeserializeComponent (UnityEngine.Component component, Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:680)
Photon.Pun.PhotonView.DeserializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:670)
Photon.Pun.PhotonNetwork.OnSerializeRead (System.Object[] data, Photon.Realtime.Player sender, System.Int32 networkTime, System.Int16 correctPrefix) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1817)
Photon.Pun.PhotonNetwork.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2188)
Photon.Realtime.LoadBalancingClient.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3142)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer stream) (at <a497a6f18e1f4b419421b940add27a6e>:0)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at <a497a6f18e1f4b419421b940add27a6e>:0)
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at <a497a6f18e1f4b419421b940add27a6e>:0)
Photon.Pun.PhotonHandler.Dispatch () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:208)
Photon.Pun.PhotonHandler.FixedUpdate () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:142)

this is the only thing holding my game back. please help.

Comments

  • Tobias
    Options
    This is a normal debugging task. You have to figure out which type you get any why it does not cast to the one expected.
    Check what you sent. OnPhotonSerializeView has a write and a read part. They must match one another.