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

Question ownerclientid recycling

Discussion in 'Netcode for GameObjects' started by liambilly, Mar 22, 2023.

  1. liambilly

    liambilly

    Joined:
    May 13, 2022
    Posts:
    154
    currenty when i disconnect a client and reconnect everytime the owneerclientid increases and is never recycled.
    i also set
    netConfig.NetworkIdRecycleDelay = 2; on the start method but it did not help
    i have also played around with networkmanager.shutdowninprogress it didnt help, how can i fix this issue
     
  2. liambilly

    liambilly

    Joined:
    May 13, 2022
    Posts:
    154
    coppied the networkmanager.connectedclients dictonary and discovered the problem is that after a client disconnects, the key field is not clearing and the value field doesnt clear after removing the client but is left with a missing reference