Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Additional documentation and release notes are available at [Multiplayer Documen

### Changed

- Optimized `NetworkList<T>` indexer setter to skip operations when the new value equals the existing value, improving performance by avoiding unnecessary list events and network synchronization. (#3587)


## [2.5.0] - 2025-08-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,13 @@ public T this[int index]
}

var previousValue = m_List[index];

// Only trigger an event if the value has changed
if (NetworkVariableSerialization<T>.AreEqual(ref previousValue, ref value))
{
return;
}

m_List[index] = value;

var listEvent = new NetworkListEvent<T>()
Expand Down
Loading