3 errors (the demo is working

alexxx9799

New member
I have those 3 errors, the game works, however:

first error:

Only the Master Client can AllocateSceneViewID(). Check PhotonNetwork.IsMasterClient!
UnityEngine.Debug:LogError(Object)
Photon.Pun.PhotonNetwork:AllocateSceneViewID(PhotonView) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:2246)
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.PunObjectPool:NetworkSpawnInternal(GameObject, GameObject) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/PunObjectPool.cs:138)
Opsive.UltimateCharacterController.Networking.Game.NetworkObjectPool:NetworkSpawn(GameObject, GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/Networking/NetworkObjectPool.cs:87)
Opsive.UltimateCharacterController.Items.Actions.ThrowableItem:ThrowItem() (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/ThrowableItem.cs:528)
Opsive.UltimateCharacterController.Items.Actions.ThrowableItem:UseItem() (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/ThrowableItem.cs:475)
Opsive.UltimateCharacterController.Character.Abilities.Items.Use:LateUpdate() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/Use.cs:633)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:LateUpdateActiveAbilities(Ability[], Int32&) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1018)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:LateUpdateUltimateLocomotion() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1004)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdatePositionAndRotation() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:814)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:UpdatePositionAndRotation(Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:526)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:OnAnimatorMove() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:1484)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:OnAnimatorMove() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1740)


second error:

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.PunObjectPool.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/PunObjectPool.cs:228)
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)


third error:

There should be one material data entry per instance. Instance data entries: 0, material data entries: 2220.
 
How can I reproduce the first error? The second one may be caused by the first, and the third error looks like it's something internal to Unity.
 
Hi, So i am trying to create multiplayer Shooting (Arrow) Game. But the problem i am getting from the past week is that, Whenever second player join the network. The Player Shoot but the arrow comes out of the bow it goes out after a 1 second delay. And also after 2 3 arrows i get that the Arrow is not pooled properly or it is duplicated. I have added only 1 entry of arrow to the object pool.

Can you please help me in this? i need to fix this very urgently. I can even send the build of the project so that you get the idea of what i mean.

Thank you
 
Does the demo scene work properly for you? The projectile is spawned with PunCharacter.Fire so this would be a good place to start debugging.
 
Nope the demo has the same problem, if you are the second player to join. It will throw exceptions of the arrow PUN not pooled properly and also it shoot the arrow after a small delay
 
I remembered that there was this thread which looks similar. I am currently getting my PUN project up to speed with version 2.2 and after that is working I am going to take a look. If it's a simple fix I'll post the solution here.
 
I am hoping to be able to look at this within the next week or so. We are getting closer to a 2.2 release.
 
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.AddOns.Multiplayer.PhotonPun.Game.PunObjectPool.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at Assets/Opsive/UltimateCharacterController/Add-Ons/Multiplayer/PhotonPUN/Scripts/Game/PunObjectPool.cs:228)
Photon.Realtime.LoadBalancingClient.OnEvent (ExitGames.Client.Photon.EventData photonEvent) (at 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/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205)
Photon.Pun.PhotonHandler.FixedUpdate () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:139)


Sure i am getting this error which is not allowing the second player to fire its arrows. Please look in to it and have it quickly fixed :) Thanks :)
 
I have some good news and some bad news.

The good news is that I have this fixed. It took me about 7 hours to trace the root of the issue and come up with a good fix for it. I think that something changed within the internals of PUN because I know that the grenades were working before.

The bad news is that this requires version 2.2. Multiple files were changed for this fix and some of those changes depends on 2.2. We are doing the best that we can to get 2.2 out so hopefully you won't have to wait much longer.
 
Top