Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    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