Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

NetworkReader:ReadByte out of range

Discussion in 'Multiplayer' started by Domanxs, Mar 2, 2017.

  1. Domanxs

    Domanxs

    Joined:
    Jul 25, 2014
    Posts:
    76
    Hey guys, been trying to figure this out for a few hours now and searched both Google and the threads here to no avail.

    Out of the blue I can not connect as a client to a server anymore, the Host/Client works as usual, but any other Client trying to connect with not even spawn a GameObject.

    IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:8 pos:8

    This is the error im Receiving, and a warning:

    Did not find target for sync message for 9

    Now no code that I use has OnSerialise or OnDeserialise anywhere, No matter if the client is a Standalone build or an Editor, Tried deleting libriary to see if it fixes itself. Then looked into my player prefab, thought some script on it might be the issue, so what I did was created a dummy prefab with just a NetworkIdentity on it, and the same error appears, so it is not anything attached to the player prefab.

    Any and all help is much appreciated trying to find out the cause.

    Unity version 5.5.1f1
     
  2. WolfoOld

    WolfoOld

    Joined:
    Jan 12, 2014
    Posts:
    22
    Having the same problem, tried with an almost empty scene with very few networked entities and it's still happening.
    I had to trash my old project because of this, after 5 months no one could find an answer so I just decided to restart but I can't do that again.