mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
add comments
This commit is contained in:
parent
c994bb41b7
commit
8f480ad963
@ -236,6 +236,9 @@ public static GameObject ReadGameObject(this NetworkReader reader)
|
||||
return networkIdentity != null ? networkIdentity.gameObject : null;
|
||||
}
|
||||
|
||||
// while SyncList<T> is recommended for NetworkBehaviours,
|
||||
// structs may have .List<T> members which weaver needs to be able to
|
||||
// fully serialize for NetworkMessages etc.
|
||||
public static List<T> ReadList<T>(this NetworkReader reader)
|
||||
{
|
||||
int length = reader.ReadInt();
|
||||
@ -249,6 +252,9 @@ public static List<T> ReadList<T>(this NetworkReader reader)
|
||||
return result;
|
||||
}
|
||||
|
||||
// while SyncSet<T> is recommended for NetworkBehaviours,
|
||||
// structs may have .Set<T> members which weaver needs to be able to
|
||||
// fully serialize for NetworkMessages etc.
|
||||
public static HashSet<T> ReadHashSet<T>(this NetworkReader reader)
|
||||
{
|
||||
int length = reader.ReadInt();
|
||||
|
@ -269,6 +269,9 @@ public static void WriteGameObject(this NetworkWriter writer, GameObject value)
|
||||
writer.WriteNetworkIdentity(identity);
|
||||
}
|
||||
|
||||
// while SyncList<T> is recommended for NetworkBehaviours,
|
||||
// structs may have .List<T> members which weaver needs to be able to
|
||||
// fully serialize for NetworkMessages etc.
|
||||
public static void WriteList<T>(this NetworkWriter writer, List<T> list)
|
||||
{
|
||||
if (list is null)
|
||||
@ -281,6 +284,9 @@ public static void WriteList<T>(this NetworkWriter writer, List<T> list)
|
||||
writer.Write(list[i]);
|
||||
}
|
||||
|
||||
// while SyncSet<T> is recommended for NetworkBehaviours,
|
||||
// structs may have .Set<T> members which weaver needs to be able to
|
||||
// fully serialize for NetworkMessages etc.
|
||||
public static void WriteHashSet<T>(this NetworkWriter writer, HashSet<T> hashSet)
|
||||
{
|
||||
if (hashSet is null)
|
||||
|
Loading…
Reference in New Issue
Block a user