Commit 0d80039
committed
perf(networked-vars): Skip NetworkList set operation when value unchanged
Added equality check in NetworkList indexer setter to avoid unnecessary operations when the new value equals the existing value. This improves performance by preventing redundant list events and network synchronization.1 parent f4b6cd4 commit 0d80039
File tree
1 file changed
+7
-0
lines changed- com.unity.netcode.gameobjects/Runtime/NetworkVariable/Collections
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
620 | 627 | | |
621 | 628 | | |
622 | 629 | | |
| |||
0 commit comments