Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Bug NetworkListEvent missing Value

Discussion in 'Netcode for GameObjects' started by cerestorm, Dec 27, 2021.

  1. cerestorm


    Apr 16, 2020
    I have a NetworkList of structs that I use to hold positions for drawing tiles on the client. When OnListChanged is called with the Add event, I draw a tile for the added struct. On the RemoveAt event the idea is to clear the tile for that struct.

    This works fine for Add, as Value contains the new struct added to the list. The problem is on RemoveAt, Value doesn't contain the struct that's removed, just an empty struct. This creates a problem as I don't know what tile to clear. I'm assuming this is a bug?

    To add, I just noticed this is working for the client but not for the host.
    Last edited: Dec 29, 2021