Why does PhotonView use unreasonable network traffic?
Options
ahoogol
✭
After i sensed lag in movement, decided to check problem. I used Photon Stats Gui to test messages rate sent or received by a photonView with the observe option "Unreliable on Change". This photonView is added to a prefab and observed transform.
When i join two player to new room, messages rate is about zero. but when instantiate the prefab, this rate will be about 17 in second that is not reasonable, because i dont change transform of the gameobject that is observed. The document about "Unreliable on Change" says:
See my screenshot below:
When i join two player to new room, messages rate is about zero. but when instantiate the prefab, this rate will be about 17 in second that is not reasonable, because i dont change transform of the gameobject that is observed. The document about "Unreliable on Change" says:
Unreliable on Change: will check each update for changes. If all values stay the same as previously sent, one update will be sent as reliable and then the owner stops sending updates unless things change again.
See my screenshot below:
0
Best Answers
-
I checked this really quick and it seems I can reproduce the issue in the Boxes Demo.
We will have a look at it early next week. This seems buggy.
Thanks for the report.5 -
I just submitted a fixed version to the Asset Store: v1.73.
If you want to fix your version, you have to modify NetworkingPeer.RunViewUpdate(). At the end, there are two foreach loops. Each needs to check if the "groupHashtable" has 0 entries (it can skip sending then). Below, is the (brief) context with the fix beingif (groupHashtable.Count == 0)
...Hashtable groupHashtable = this.dataPerGroupReliable[groupId]; // this is the fix: if (groupHashtable.Count == 0) { continue; }
5
Answers
-
I checked this really quick and it seems I can reproduce the issue in the Boxes Demo.
We will have a look at it early next week. This seems buggy.
Thanks for the report.5 -
I just submitted a fixed version to the Asset Store: v1.73.
If you want to fix your version, you have to modify NetworkingPeer.RunViewUpdate(). At the end, there are two foreach loops. Each needs to check if the "groupHashtable" has 0 entries (it can skip sending then). Below, is the (brief) context with the fix beingif (groupHashtable.Count == 0)
...Hashtable groupHashtable = this.dataPerGroupReliable[groupId]; // this is the fix: if (groupHashtable.Count == 0) { continue; }
5