Skip to content

Commit 510ba63

Browse files
committed
NetworkList Equal Check
1 parent 30b0cfb commit 510ba63

File tree

1 file changed

+6
-0
lines changed
  • com.unity.netcode.gameobjects/Runtime/NetworkVariable/Collections

1 file changed

+6
-0
lines changed

com.unity.netcode.gameobjects/Runtime/NetworkVariable/Collections/NetworkList.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,12 @@ public T this[int index]
618618
}
619619

620620
var previousValue = m_List[index];
621+
622+
if (previousValue.Equals(value))
623+
{
624+
return;
625+
}
626+
621627
m_List[index] = value;
622628

623629
var listEvent = new NetworkListEvent<T>()

0 commit comments

Comments
 (0)