Skip to content
Closed
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. (#????)


## [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];

// Compare the Value being applied to the current value
if (NetworkVariableSerialization<T>.AreEqual(ref previousValue, ref value))
{
return;
}

m_List[index] = value;

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