Is there a way to make PhotonNetwork wait a little while before recycling a ViewID?

I have a scenario where multiple things may be created and destroyed in a single frame. This sometimes results in RPCs arriving after a ViewID has already been reassigned, causing an error. I think that I could avoid this if I could just make the photon network wait a second before recycling the ID of a destroyed photonview. Any advice on how to do this, or otherwise prevent the problem, would be appreciated.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @AidanofVT,

    I think receiving RPC after PhotonView destruction is OK and expected (meaning it could happen) and PUN will log maybe a warning or info log but not an error if I'm not mistaken.
    In any case, I think if you want to avoid this, you could disable auto destroy of network objects and destroy them manually when you want to.
  • @JohnTube Thanks. In the process of reducing RPC calls, I did come up with a way to eliminate the errors, but that sounds like a good idea nonetheless.