InvalidCastException: Specified cast is not valid. on PhotonTransformViewRotationControl
Options
I am getting this error :
This happens inside PhotonTransformViewClassic component, so this is something that I am probably not responsible with, or am I missing something?
InvalidCastException: Specified cast is not valid.
Photon.Pun.PhotonTransformViewRotationControl.OnPhotonSerializeView (UnityEngine.Quaternion currentRotation, Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs:483)
Photon.Pun.PhotonTransformViewClassic.OnPhotonSerializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs:130)
Photon.Pun.PhotonView.DeserializeComponent (UnityEngine.Component component, Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:351)
Photon.Pun.PhotonView.DeserializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:341)
Photon.Pun.PhotonNetwork.OnSerializeRead (System.Object[] data, Photon.Realtime.Player sender, System.Int32 networkTime, System.Int16 correctPrefix) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1670)
Photon.Pun.PhotonNetwork.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2040)
Photon.Realtime.LoadBalancingClient.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Standard Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2785)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer stream) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:640)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:552)
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1548)
Photon.Pun.PhotonHandler.Dispatch () (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205)
Photon.Pun.PhotonHandler.LateUpdate () (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:148)
This happens inside PhotonTransformViewClassic component, so this is something that I am probably not responsible with, or am I missing something?
InvalidCastException: Specified cast is not valid.
Photon.Pun.PhotonTransformViewRotationControl.OnPhotonSerializeView (UnityEngine.Quaternion currentRotation, Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs:483)
Photon.Pun.PhotonTransformViewClassic.OnPhotonSerializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs:130)
Photon.Pun.PhotonView.DeserializeComponent (UnityEngine.Component component, Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:351)
Photon.Pun.PhotonView.DeserializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:341)
Photon.Pun.PhotonNetwork.OnSerializeRead (System.Object[] data, Photon.Realtime.Player sender, System.Int32 networkTime, System.Int16 correctPrefix) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1670)
Photon.Pun.PhotonNetwork.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2040)
Photon.Realtime.LoadBalancingClient.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Standard Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2785)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer stream) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:640)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:552)
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1548)
Photon.Pun.PhotonHandler.Dispatch () (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205)
Photon.Pun.PhotonHandler.LateUpdate () (at Assets/Standard Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:148)
0
Comments
-
Hi. I am using version 2.15 from asset store. I am only syncing rotation. It's going to be difficult to send repro case.. unless I send entire project. Very strange.
0 -
Hi,
It could be the setup on the sender side is different from the setup on the receiving side. How are you instantiating the network instance using this transform view component?
how often and when does this happen? when you join a room? leave a room? while in room?
Can you try with the regular PhotonTransformView, does it work then?
Bye,
Jean0