Hi,
I can't find the reason, why that error appears only in client app when connected to the server. Full error message:
I am using PhotonView component with unrelieble observe option and ControllerHandler observer component attached to it. Similar error is received if attach only Photon Animator View. Looks like a problem in syncing with gameObject which is not created yet.
I have found that syncing trouble - master client get that debug log:
master client screenshot
and
client log looks like that:
client screenshot
Any ideas why that can happens? Why photonview start syncing with a object which wasn't created yet?
I can't find the reason, why that error appears only in client app when connected to the server. Full error message:
InvalidCastException: Cannot cast from source type to destination type.
Opsive.ThirdPersonController.ControllerHandler.OnPhotonSerializeView (.PhotonStream stream, .PhotonMessageInfo info) (at Assets/Third Person Controller/Scripts/Character/ControllerHandler.cs:287)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
PhotonView.ExecuteComponentOnSerialize (UnityEngine.Component component, .PhotonStream stream, .PhotonMessageInfo info) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:525)
PhotonView.DeserializeComponent (UnityEngine.Component component, .PhotonStream stream, .PhotonMessageInfo info) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:355)
PhotonView.DeserializeView (.PhotonStream stream, .PhotonMessageInfo info) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonView.cs:340)
NetworkingPeer.OnSerializeRead (System.Object[] data, .PhotonPlayer sender, Int32 networkTime, Int16 correctPrefix) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:3932)
NetworkingPeer.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2264)
ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (System.Byte[] inBuff)
ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands ()
ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands ()
PhotonHandler.Update () (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:125)
I am using PhotonView component with unrelieble observe option and ControllerHandler observer component attached to it. Similar error is received if attach only Photon Animator View. Looks like a problem in syncing with gameObject which is not created yet.
I have found that syncing trouble - master client get that debug log:
master client screenshot
and
client log looks like that:
client screenshot
Any ideas why that can happens? Why photonview start syncing with a object which wasn't created yet?