@@ -21,12 +21,12 @@ public class NetworkList<T> : NetworkVariableBase where T : unmanaged, IEquatabl
2121 public delegate void OnListChangedDelegate ( NetworkListEvent < T > changeEvent ) ;
2222
2323 /// <summary>
24- /// The callback to be invoked when the list gets changed
24+ /// Creates A NetworkList/>
2525 /// </summary>
2626 public event OnListChangedDelegate OnListChanged ;
2727
2828 /// <summary>
29- /// Constructor method for <see cref="NetworkList"/>
29+ /// Constructor method for <see cref="NetworkList{T} "/>
3030 /// </summary>
3131 public NetworkList ( ) { }
3232
@@ -132,7 +132,7 @@ public override void WriteDelta(FastBufferWriter writer)
132132 }
133133 }
134134
135- /// <inheritdoc cref="NetworkVariable{T}.Writeield "/>
135+ /// <inheritdoc cref="NetworkVariable{T}.WriteField "/>
136136 public override void WriteField ( FastBufferWriter writer )
137137 {
138138 writer . WriteValueSafe ( ( ushort ) m_List . Length ) ;
@@ -158,12 +158,12 @@ public override void ReadField(FastBufferReader reader)
158158 /// <inheritdoc cref="NetworkVariable{T}.ReadDelta"/>
159159 public override void ReadDelta ( FastBufferReader reader , bool keepDirtyDelta )
160160 {
161- /// This is only invoked by <see cref="NetworkVariableDeltaMessage"/> and the only time
162- /// keepDirtyDelta is set is when it is the server processing. To be able to handle previous
163- /// versions, we use IsServer to keep the dirty states received and the keepDirtyDelta to
164- /// actually mark this as dirty and add it to the list of <see cref="NetworkObject"/>s to
165- /// be updated. With the forwarding of deltas being handled by <see cref="NetworkVariableDeltaMessage"/>,
166- /// once all clients have been forwarded the dirty events, we clear them by invoking <see cref="PostDeltaRead"/>.
161+ // This is only invoked by <see cref="NetworkVariableDeltaMessage"/> and the only time
162+ // keepDirtyDelta is set is when it is the server processing. To be able to handle previous
163+ // versions, we use IsServer to keep the dirty states received and the keepDirtyDelta to
164+ // actually mark this as dirty and add it to the list of <see cref="NetworkObject"/>s to
165+ // be updated. With the forwarding of deltas being handled by <see cref="NetworkVariableDeltaMessage"/>,
166+ // once all clients have been forwarded the dirty events, we clear them by invoking <see cref="PostDeltaRead"/>.
167167 var isServer = m_NetworkManager . IsServer ;
168168 reader . ReadValueSafe ( out ushort deltaCount ) ;
169169 for ( int i = 0 ; i < deltaCount ; i ++ )
@@ -406,13 +406,22 @@ internal override void PostDeltaRead()
406406 }
407407 }
408408
409- /// <inheritdoc cref="NetworkVariable{T}.GetEnumerator"/>
409+ /// <summary>
410+ /// Returns an enumerator that iterates through the <see cref="NetworkList{T}" />.
411+ /// </summary>
412+ /// <returns>An enumerator for the <see cref="NetworkList{T}"/>.</returns>
410413 public IEnumerator < T > GetEnumerator ( )
411414 {
412415 return m_List . GetEnumerator ( ) ;
413416 }
414417
415- /// <inheritdoc cref="NetworkVariable{T}.Add"/>
418+ /// <summary>
419+ /// Adds an item to the end of the <see cref="NetworkList{T}"/>.
420+ /// </summary>
421+ /// <param name="item">The item to be added to the list.</param>
422+ /// <remarks>
423+ /// This method checks for write permissions before adding the item.
424+ /// </remarks>
416425 public void Add ( T item )
417426 {
418427 // check write permissions
@@ -434,7 +443,12 @@ public void Add(T item)
434443 HandleAddListEvent ( listEvent ) ;
435444 }
436445
437- /// <inheritdoc cref="NetworkVariable{T}.Clear"/>
446+ /// <summary>
447+ /// Removes all items from the <see cref="NetworkList{T}"/>.
448+ /// </summary>
449+ /// <remarks>
450+ /// This method checks for write permissions before clearing the list.
451+ /// </remarks>
438452 public void Clear ( )
439453 {
440454 // check write permissions
@@ -454,14 +468,25 @@ public void Clear()
454468 HandleAddListEvent ( listEvent ) ;
455469 }
456470
457- /// <inheritdoc cref="NetworkVariable{T}.Contains"/>
471+ /// <summary>
472+ /// Determines whether the <see cref="NetworkList{T}"/> contains a specific value.
473+ /// </summary>
474+ /// <param name="item">The object to locate in the <see cref="NetworkList{T}"/>.</param>
475+ /// <returns><see langword="true" /> if the <see cref="item"/> is found in the <see cref="NetworkList{T}"/>; otherwise, <see langword="false" />.</returns>
458476 public bool Contains ( T item )
459477 {
460478 int index = m_List . IndexOf ( item ) ;
461479 return index != - 1 ;
462480 }
463481
464- /// <inheritdoc cref="NetworkVariable{T}.Remove"/>
482+ /// <summary>
483+ /// Removes the first occurrence of a specific object from the NetworkList.
484+ /// </summary>
485+ /// <remarks>
486+ /// This method checks for write permissions before removing the item.
487+ /// </remarks>
488+ /// <param name="item">The object to remove from the list.</param>
489+ /// <returns><see langword="true" /> if the item was successfully removed from the list; otherwise, <see langword="false" />.</returns>
465490 public bool Remove ( T item )
466491 {
467492 // check write permissions
@@ -488,16 +513,29 @@ public bool Remove(T item)
488513 return true ;
489514 }
490515
491- /// <inheritdoc cref="NetworkVariable{T}.Count"/>
516+ /// <summary>
517+ /// Gets the number of elements contained in the <see cref="NetworkList{T}"/>.
518+ /// </summary>
492519 public int Count => m_List . Length ;
493520
494- /// <inheritdoc cref="NetworkVariable{T}.IndexOf"/>
521+ /// <summary>
522+ /// Determines the index of a specific <see cref="item"/> in the <see cref="NetworkList{T}"/>.
523+ /// </summary>
524+ /// <param name="item">The object to remove from the list.</param>
525+ /// <returns>The index of the <see cref="item"/> if found in the list; otherwise, -1.</returns>
495526 public int IndexOf ( T item )
496527 {
497528 return m_List . IndexOf ( item ) ;
498529 }
499530
500- /// <inheritdoc cref="NetworkVariable{T}.Insert"/>
531+ /// <summary>
532+ /// Inserts <see cref="item"/> to the <see cref="NetworkList{T}"/> at the specified <see cref="index"/>.
533+ /// </summary>
534+ /// <remarks>
535+ /// This method checks for write permissions before inserting the item.
536+ /// </remarks>
537+ /// <param name="index">The index at which the item should be inserted.</param>
538+ /// <param name="item">The item to insert.</param>
501539 public void Insert ( int index , T item )
502540 {
503541 // check write permissions
@@ -527,7 +565,13 @@ public void Insert(int index, T item)
527565 HandleAddListEvent ( listEvent ) ;
528566 }
529567
530- /// <inheritdoc cref="NetworkVariable{T}.RemoveAt"/>
568+ /// <summary>
569+ /// Removes the <see cref="NetworkList{T}"/> item at the specified <see cref="index"/>.
570+ /// </summary>
571+ /// <remarks>
572+ /// This method checks for write permissions before removing the item.
573+ /// </remarks>
574+ /// <param name="index">The index of the element to remove.</param>
531575 public void RemoveAt ( int index )
532576 {
533577 // check write permissions
@@ -549,9 +593,14 @@ public void RemoveAt(int index)
549593 HandleAddListEvent ( listEvent ) ;
550594 }
551595
552-
553-
554- /// <inheritdoc cref="NetworkVariable{T}.this"/>
596+ /// <summary>
597+ /// Gets or sets the element at the specified index in the <see cref="NetworkList{T}"/>.
598+ /// </summary>
599+ /// <remarks>
600+ /// This method checks for write permissions before setting the value.
601+ /// </remarks>
602+ /// <param name="index">The zero-based index of the element to get or set.</param>
603+ /// <value>The element at the specified index.</value>
555604 public T this [ int index ]
556605 {
557606 get => m_List [ index ] ;
@@ -587,7 +636,7 @@ private void HandleAddListEvent(NetworkListEvent<T> listEvent)
587636 }
588637
589638 /// <summary>
590- /// This is actually unused left- over from a previous interface
639+ /// This method should not be used. It is left over from a previous interface
591640 /// </summary>
592641 public int LastModifiedTick
593642 {
0 commit comments