@@ -1022,7 +1022,7 @@ public void Duplicate(in NativeList<T> value, ref NativeList<T> duplicatedValue)
1022
1022
/// <summary>
1023
1023
/// Serializer for managed INetworkSerializable types, which differs from the unmanaged implementation in that it
1024
1024
/// has to be null-aware
1025
- /// <typeparam name="T"></typeparam >
1025
+ /// </summary >
1026
1026
internal class ManagedNetworkSerializableSerializer < T > : INetworkVariableSerializer < T > where T : class , INetworkSerializable , new ( )
1027
1027
{
1028
1028
public void Write ( FastBufferWriter writer , ref T value )
@@ -1095,7 +1095,7 @@ public void Duplicate(in T value, ref T duplicatedValue)
1095
1095
/// extension methods. Finding those methods isn't achievable efficiently at runtime, so this allows
1096
1096
/// users to tell NetworkVariable about those extension methods (or simply pass in a lambda)
1097
1097
/// </summary>
1098
- /// <typeparam name="T"></typeparam>
1098
+ /// <typeparam name="T">The type to be serialized. </typeparam>
1099
1099
public class UserNetworkVariableSerialization < T >
1100
1100
{
1101
1101
/// <summary>
@@ -1110,6 +1110,7 @@ public class UserNetworkVariableSerialization<T>
1110
1110
/// </summary>
1111
1111
/// <param name="writer">The <see cref="FastBufferWriter"/> to write the value of type `T`</param>
1112
1112
/// <param name="value">The value of type `T` to be written</param>
1113
+ /// <param name="previousValue">The previous value of type `T` to be compared.</param>
1113
1114
public delegate void WriteDeltaDelegate ( FastBufferWriter writer , in T value , in T previousValue ) ;
1114
1115
1115
1116
/// <summary>
@@ -1129,8 +1130,8 @@ public class UserNetworkVariableSerialization<T>
1129
1130
/// <summary>
1130
1131
/// The read value delegate handler definition
1131
1132
/// </summary>
1132
- /// <param name="reader ">The <see cref="FastBufferReader"/> to read the value of type `T`</param>
1133
- /// <param name="value ">The value of type `T` to be read </param>
1133
+ /// <param name="value ">The value of type `T` to be duplicated. </param>
1134
+ /// <param name="duplicatedValue ">The duplicated value of type `T`. </param>
1134
1135
public delegate void DuplicateValueDelegate ( in T value , ref T duplicatedValue ) ;
1135
1136
1136
1137
/// <summary>
@@ -1273,46 +1274,47 @@ internal static void InitializeIntegerSerialization()
1273
1274
}
1274
1275
1275
1276
/// <summary>
1276
- /// Registeres an unmanaged type that will be serialized by a direct memcpy into a buffer
1277
+ /// Registers an unmanaged type that will be serialized by a direct memcpy into a buffer
1277
1278
/// </summary>
1278
- /// <typeparam name="T"></typeparam>
1279
+ /// <typeparam name="T">The unmanaged type to be serialized </typeparam>
1279
1280
public static void InitializeSerializer_UnmanagedByMemcpy < T > ( ) where T : unmanaged
1280
1281
{
1281
1282
NetworkVariableSerialization < T > . Serializer = new UnmanagedTypeSerializer < T > ( ) ;
1282
1283
}
1283
1284
1284
1285
/// <summary>
1285
- /// Registeres an unmanaged type that will be serialized by a direct memcpy into a buffer
1286
+ /// Registers an unmanaged array type that will be serialized by a direct memcpy into a buffer
1286
1287
/// </summary>
1287
- /// <typeparam name="T"></typeparam>
1288
+ /// <typeparam name="T">The unmanaged type to be serialized </typeparam>
1288
1289
public static void InitializeSerializer_UnmanagedByMemcpyArray < T > ( ) where T : unmanaged
1289
1290
{
1290
1291
NetworkVariableSerialization < NativeArray < T > > . Serializer = new UnmanagedArraySerializer < T > ( ) ;
1291
1292
}
1292
1293
1293
1294
#if UNITY_NETCODE_NATIVE_COLLECTION_SUPPORT
1294
1295
/// <summary>
1295
- /// Registeres an unmanaged type that will be serialized by a direct memcpy into a buffer
1296
+ /// Registers an unmanaged list type that will be serialized by a direct memcpy into a buffer
1296
1297
/// </summary>
1297
- /// <typeparam name="T"></typeparam>
1298
+ /// <typeparam name="T">The unmanaged type to be serialized </typeparam>
1298
1299
public static void InitializeSerializer_UnmanagedByMemcpyList < T > ( ) where T : unmanaged
1299
1300
{
1300
1301
NetworkVariableSerialization < NativeList < T > > . Serializer = new UnmanagedListSerializer < T > ( ) ;
1301
1302
}
1302
1303
1303
1304
/// <summary>
1304
- /// Registeres a native hash set (this generic implementation works with all types)
1305
+ /// Registers a native hash set (this generic implementation works with all types)
1305
1306
/// </summary>
1306
- /// <typeparam name="T"></typeparam>
1307
+ /// <typeparam name="T">The type of elements in the hash set. </typeparam>
1307
1308
public static void InitializeSerializer_NativeHashSet < T > ( ) where T : unmanaged, IEquatable < T >
1308
1309
{
1309
1310
NetworkVariableSerialization < NativeHashSet < T > > . Serializer = new NativeHashSetSerializer < T > ( ) ;
1310
1311
}
1311
1312
1312
1313
/// <summary>
1313
- /// Registeres a native hash set (this generic implementation works with all types)
1314
+ /// Registers a native hash set (this generic implementation works with all types)
1314
1315
/// </summary>
1315
- /// <typeparam name="T"></typeparam>
1316
+ /// <typeparam name="TKey">The type of keys in the hash map.</typeparam>
1317
+ /// <typeparam name="TVal">The type of values in the hash map.</typeparam>
1316
1318
public static void InitializeSerializer_NativeHashMap < TKey , TVal > ( )
1317
1319
where TKey : unmanaged, IEquatable < TKey >
1318
1320
where TVal : unmanaged
@@ -1322,27 +1324,28 @@ public static void InitializeSerializer_NativeHashMap<TKey, TVal>()
1322
1324
#endif
1323
1325
1324
1326
/// <summary>
1325
- /// Registeres a native hash set (this generic implementation works with all types)
1327
+ /// Registers a native hash set (this generic implementation works with all types)
1326
1328
/// </summary>
1327
- /// <typeparam name="T"></typeparam>
1329
+ /// <typeparam name="T">The type of elements in the list. </typeparam>
1328
1330
public static void InitializeSerializer_List < T > ( )
1329
1331
{
1330
1332
NetworkVariableSerialization < List < T > > . Serializer = new ListSerializer < T > ( ) ;
1331
1333
}
1332
1334
1333
1335
/// <summary>
1334
- /// Registeres a native hash set (this generic implementation works with all types)
1336
+ /// Registers a native hash set (this generic implementation works with all types)
1335
1337
/// </summary>
1336
- /// <typeparam name="T"></typeparam>
1338
+ /// <typeparam name="T">The type of elements in the hash set. </typeparam>
1337
1339
public static void InitializeSerializer_HashSet < T > ( ) where T : IEquatable < T >
1338
1340
{
1339
1341
NetworkVariableSerialization < HashSet < T > > . Serializer = new HashSetSerializer < T > ( ) ;
1340
1342
}
1341
1343
1342
1344
/// <summary>
1343
- /// Registeres a native hash set (this generic implementation works with all types)
1345
+ /// Registers a native hash set (this generic implementation works with all types)
1344
1346
/// </summary>
1345
- /// <typeparam name="T"></typeparam>
1347
+ /// <typeparam name="TKey">The type of keys in the dictionary.</typeparam>
1348
+ /// <typeparam name="TVal">The type of values in the dictionary.</typeparam>
1346
1349
public static void InitializeSerializer_Dictionary < TKey , TVal > ( ) where TKey : IEquatable < TKey >
1347
1350
{
1348
1351
NetworkVariableSerialization < Dictionary < TKey , TVal > > . Serializer = new DictionarySerializer < TKey , TVal > ( ) ;
@@ -1352,7 +1355,7 @@ public static void InitializeSerializer_Dictionary<TKey, TVal>() where TKey : IE
1352
1355
/// Registers an unmanaged type that implements INetworkSerializable and will be serialized through a call to
1353
1356
/// NetworkSerialize
1354
1357
/// </summary>
1355
- /// <typeparam name="T"></typeparam>
1358
+ /// <typeparam name="T">The unmanaged type that implements INetworkSerializable. </typeparam>
1356
1359
public static void InitializeSerializer_UnmanagedINetworkSerializable < T > ( ) where T : unmanaged, INetworkSerializable
1357
1360
{
1358
1361
NetworkVariableSerialization < T > . Serializer = new UnmanagedNetworkSerializableSerializer < T > ( ) ;
@@ -1362,7 +1365,7 @@ public static void InitializeSerializer_UnmanagedINetworkSerializable<T>() where
1362
1365
/// Registers an unmanaged type that implements INetworkSerializable and will be serialized through a call to
1363
1366
/// NetworkSerialize
1364
1367
/// </summary>
1365
- /// <typeparam name="T"></typeparam>
1368
+ /// <typeparam name="T">The unmanaged type that implements INetworkSerializable. </typeparam>
1366
1369
public static void InitializeSerializer_UnmanagedINetworkSerializableArray < T > ( ) where T : unmanaged, INetworkSerializable
1367
1370
{
1368
1371
NetworkVariableSerialization < NativeArray < T > > . Serializer = new UnmanagedNetworkSerializableArraySerializer < T > ( ) ;
@@ -1373,7 +1376,7 @@ public static void InitializeSerializer_UnmanagedINetworkSerializableArray<T>()
1373
1376
/// Registers an unmanaged type that implements INetworkSerializable and will be serialized through a call to
1374
1377
/// NetworkSerialize
1375
1378
/// </summary>
1376
- /// <typeparam name="T"></typeparam>
1379
+ /// <typeparam name="T">The unmanaged type that implements INetworkSerializable. </typeparam>
1377
1380
public static void InitializeSerializer_UnmanagedINetworkSerializableList < T > ( ) where T : unmanaged, INetworkSerializable
1378
1381
{
1379
1382
NetworkVariableSerialization < NativeList < T > > . Serializer = new UnmanagedNetworkSerializableListSerializer < T > ( ) ;
@@ -1384,7 +1387,7 @@ public static void InitializeSerializer_UnmanagedINetworkSerializableList<T>() w
1384
1387
/// Registers a managed type that implements INetworkSerializable and will be serialized through a call to
1385
1388
/// NetworkSerialize
1386
1389
/// </summary>
1387
- /// <typeparam name="T"></typeparam>
1390
+ /// <typeparam name="T">The managed type that implements INetworkSerializable. </typeparam>
1388
1391
public static void InitializeSerializer_ManagedINetworkSerializable < T > ( ) where T : class , INetworkSerializable , new ( )
1389
1392
{
1390
1393
NetworkVariableSerialization < T > . Serializer = new ManagedNetworkSerializableSerializer < T > ( ) ;
@@ -1394,7 +1397,7 @@ public static void InitializeSerializer_UnmanagedINetworkSerializableList<T>() w
1394
1397
/// Registers a FixedString type that will be serialized through FastBufferReader/FastBufferWriter's FixedString
1395
1398
/// serializers
1396
1399
/// </summary>
1397
- /// <typeparam name="T"></typeparam>
1400
+ /// <typeparam name="T">The FixedString type to be serialized. </typeparam>
1398
1401
public static void InitializeSerializer_FixedString < T > ( ) where T : unmanaged, INativeList < byte > , IUTF8Bytes
1399
1402
{
1400
1403
NetworkVariableSerialization < T > . Serializer = new FixedStringSerializer < T > ( ) ;
@@ -1404,7 +1407,7 @@ public static void InitializeSerializer_FixedString<T>() where T : unmanaged, IN
1404
1407
/// Registers a FixedString type that will be serialized through FastBufferReader/FastBufferWriter's FixedString
1405
1408
/// serializers
1406
1409
/// </summary>
1407
- /// <typeparam name="T"></typeparam>
1410
+ /// <typeparam name="T">The FixedString type to be serialized. </typeparam>
1408
1411
public static void InitializeSerializer_FixedStringArray < T > ( ) where T : unmanaged, INativeList < byte > , IUTF8Bytes
1409
1412
{
1410
1413
NetworkVariableSerialization < NativeArray < T > > . Serializer = new FixedStringArraySerializer < T > ( ) ;
@@ -1415,7 +1418,7 @@ public static void InitializeSerializer_FixedStringArray<T>() where T : unmanage
1415
1418
/// Registers a FixedString type that will be serialized through FastBufferReader/FastBufferWriter's FixedString
1416
1419
/// serializers
1417
1420
/// </summary>
1418
- /// <typeparam name="T"></typeparam>
1421
+ /// <typeparam name="T">The FixedString type to be serialized. </typeparam>
1419
1422
public static void InitializeSerializer_FixedStringList < T > ( ) where T : unmanaged, INativeList < byte > , IUTF8Bytes
1420
1423
{
1421
1424
NetworkVariableSerialization < NativeList < T > > . Serializer = new FixedStringListSerializer < T > ( ) ;
@@ -1467,7 +1470,7 @@ public static void InitializeEqualityChecker_HashSet<T>() where T : IEquatable<T
1467
1470
/// <summary>
1468
1471
/// Registers an unmanaged type that will be checked for equality using T.Equals()
1469
1472
/// </summary>
1470
- /// <typeparam name="TKey">The type of dictionary keys that implements IEquatable<TKey> .</typeparam>
1473
+ /// <typeparam name="TKey">The type of dictionary keys that implements IEquatable.</typeparam>
1471
1474
/// <typeparam name="TVal">The type of dictionary values.</typeparam>
1472
1475
public static void InitializeEqualityChecker_Dictionary < TKey , TVal > ( )
1473
1476
where TKey : IEquatable < TKey >
@@ -1495,7 +1498,7 @@ public static void InitializeEqualityChecker_NativeHashSet<T>() where T : unmana
1495
1498
/// <summary>
1496
1499
/// Registers an unmanaged type that will be checked for equality using T.Equals()
1497
1500
/// </summary>
1498
- /// <typeparam name="TKey">The type of dictionary keys that implements IEquatable<TKey> .</typeparam>
1501
+ /// <typeparam name="TKey">The type of dictionary keys that implements IEquatable.</typeparam>
1499
1502
/// <typeparam name="TVal">The type of dictionary values.</typeparam>
1500
1503
public static void InitializeEqualityChecker_NativeHashMap < TKey , TVal > ( )
1501
1504
where TKey : unmanaged, IEquatable < TKey >
@@ -1562,6 +1565,9 @@ public static class NetworkVariableSerialization<T>
1562
1565
/// <summary>
1563
1566
/// A callback to check if two values are equal.
1564
1567
/// </summary>
1568
+ /// <param name="a">The first value to compare.</param>
1569
+ /// <param name="b">The second value to compare.</param>
1570
+ /// <returns>True if the values are equal; otherwise, false.</returns>
1565
1571
public delegate bool EqualsDelegate ( ref T a , ref T b ) ;
1566
1572
1567
1573
/// <summary>
@@ -1642,6 +1648,7 @@ public static void Read(FastBufferReader reader, ref T value)
1642
1648
/// </summary>
1643
1649
/// <param name="writer">The FastBufferWriter to write the serialized data to.</param>
1644
1650
/// <param name="value">The value to serialize</param>
1651
+ /// <param name="previousValue">The previous value of type `T` to be compared.</param>
1645
1652
public static void WriteDelta ( FastBufferWriter writer , ref T value , ref T previousValue )
1646
1653
{
1647
1654
Serializer . WriteDelta ( writer , ref value , ref previousValue ) ;
0 commit comments