I am creating a 3d game application in unity with the use of PUN2. When I start the game, all players automatically disconnected and the animation of players is kinda lag or not synchronizing towards all players. I was wondering if it is because of the RPC's that i called.
I know this is kinda stupid but i have 200+ methods marked as PunRPC.
My Question is: does using or calling an RPC in PUN causes a lag and automatic disconnecting of player/s? or is it because i calls a lot of data/objects all over the network?
I do have this error occurs when a player/s disconnected automatically:
Error 1:
PhotonView ID duplicate found: 999. New: View 999 on RoomManager (scene) old: View 999 on RoomManager (scene). Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new. UnityEngine.Debug:LogError(Object) Photon.Pun.PhotonNetwork:RegisterPhotonView(PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1003) Photon.Pun.PhotonView:Awake() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:590)
Error 2:
InvalidOperationException: Duplicate key 999 ExitGames.Client.Photon.NonAllocDictionary`2[K,V].Add (K key, V val) (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/DataTypes.cs:309) Photon.Pun.PhotonNetwork.RegisterPhotonView (Photon.Pun.PhotonView netView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:1014) Photon.Pun.PhotonView.Awake () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:590)
and I know this errors will occur only if I did not disconnected properly from the previous game on which my room manager still exist and did not destroy from the previous one...