How can spawn many items at once without getting NetBitBuffer OutOfBounds Exceptions


We are making a game in whch a lot of Network Objects are already present in the scene when you load it.

But when this number is too high (the exact number depends on what's replicated and which component are on each Network Objects, but it is usually between 130 - 200), we get this exception in the Host and the client crashes

(in this picture, I had 800 NetworkObjet with a NetworkRigidbody on them in an almost empty scene)

One quick and dirty fix we came up with is that we wait for every client to have load the scene before spawning the objets in batches less that 100 (we chose 25 to be sure)

But there must be some ways to bypass this behaviour, and also we are curious to understand why it does that


  • emotitron
    emotitron ✭✭✭

    This is a known bug with Eventual Consistency mode and large initial states. If you don't need Interest Management (AOI, etc) yet, you can switch to Delta Compression mode until it is resolved.