Bug or Did I make a mistake? Urgent....................
Options
I was trying my build and suddenly I started getting this error. I added a new layer to my animator but I tried playing a few times and got no error but then this one started. please help me. I searched about this and saw some bugs but when I checked photon's scripts , this version is already fixed with bugs. Urgent please
InvalidCastException: Specified cast is not valid. Photon.Pun.PhotonAnimatorView.DeserializeDataDiscretly (Photon.Pun.PhotonStream stream) (at Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:431) Photon.Pun.PhotonAnimatorView.OnPhotonSerializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs:550) Photon.Pun.PhotonView.DeserializeComponent (UnityEngine.Component component, Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:351) Photon.Pun.PhotonView.DeserializeView (Photon.Pun.PhotonStream stream, Photon.Pun.PhotonMessageInfo info) (at 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/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1725) Photon.Pun.PhotonNetwork.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:2095) Photon.Realtime.LoadBalancingClient.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2826) ExitGames.Client.Photon.PeerBase.DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer stream) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:656) ExitGames.Client.Photon.EnetPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:549) ExitGames.Client.Photon.PhotonPeer.DispatchIncomingCommands () (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1598) Photon.Pun.PhotonHandler.Dispatch () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205) Photon.Pun.PhotonHandler.FixedUpdate () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:139)
0
Comments
-
Hi @Bürküt,
I'm not sure if the PhotonAnimatorView supports mecanim layers.
What PUN version are you using?
What are the minimal repro steps to get this exception?
Hi @JohnTube
I'm using PUN 2 v2.16
before InvalidCastException I get Array index out of bounds error. Unit has a weapon so on the animator I created a new layer and put a avatar mask on it. Like I said, it worked for maybe 2-3 times without any errors but than this started. Just to move on I deleted second layer becouse my team waited for me to complete a part on gameplay.
I thought about creating different animation for the weapon but in that case I have to write extra lines and just didnt want to.0