Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Increase buffer size NetworkList

Discussion in 'Multiplayer' started by HRDev, Feb 9, 2022.

  1. HRDev

    HRDev

    Joined:
    Jun 4, 2018
    Posts:
    60
    I have to pass a lot of players data in a NetworkList.
    All works with low data, but when i increes the variables in the struct i recive this error:

    Code (CSharp):
    1. OverflowException: Writing past the end of the buffer
    2. Unity.Netcode.NetworkList`1[T].WriteDelta (Unity.Netcode.FastBufferWriter writer) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.5/Runtime/NetworkVariable/Collections/NetworkList.cs:125)
    is there any way to increase the buffer size?
     
  2. cerestorm

    cerestorm

    Joined:
    Apr 16, 2020
    Posts:
    686
    This is an on-going issue which has been mentioned several times. I've created a test project that reproduces the issue and attached it to a bug report so hopefully that will be picked up and the problem fixed.
     
    HRDev likes this.
  3. HRDev

    HRDev

    Joined:
    Jun 4, 2018
    Posts:
    60
    there is no work around?
     
  4. cerestorm

    cerestorm

    Joined:
    Apr 16, 2020
    Posts:
    686
    You could limit the amount you add to the list in one go, that would likely work.

    Btw I did bug this and apparently it's fixed already, but I think there's a block on merging it into a release (someone from Unity would have to clarify this).