PUN - Disconnects with to many Photon Views instantiated

Hey,

So when I'm testing my game, I get disconnected after too many minions are spawned. No error or log gets debugged, the game objects associated with the player just get destroyed.

I believe this is to do with having too many PhotonViews attached to objects. I'm testing all three players/instances of the game on the same PC and the other instances don't disconnect when this happens. It happens after about 30 are spawned. If relevant, this is on AU servers.

Its an RTS style game, each minion on the local side has an animation controller and a NavMeshAgent, over the network I'm syncing the transform and the animation. Disabling the navmesh for remote clients.

I was hoping someone could provide me with some info on the capabilities of PUN. Am I doing a bad practice? Like should I be managing the syncing differently and limiting the photon views being used.

Hope someone can help :)

Comments

  • One thing I can think of is have a manager script for them. If it's local, update the manager script with its Anim vals, and transform component. If its a network object the read from that value and move/animate the character.

    Though that comes with some cons I think.. One is that you loos the nice smooth Transform sync Photon has ready to go, I could write my own but I dought it will be as good. And the other, if Im syncing a massive list of objects and properties. Wouldn't that be worse? Like one large data chunk being waited on rather that little bits being pushed from each Character/Unit.
  • JohnTubeJohnTube mod
    edited August 14
    Hi @Harley,

    Did you "Analyze Disconnects"? you should start by finding out the cause.
    There is also "Optimization Tips" and "Performance Tips".
Sign In or Register to comment.