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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug NetworkListEvent missing Value

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

  1. cerestorm

    cerestorm

    Joined:
    Apr 16, 2020
    Posts:
    397
    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
unityunity