Skip to content

Commit 2400c2d

Browse files
authored
fix: Corrects an error in BufferSerializer documentaiton (#2401)
1 parent f6d3a58 commit 2400c2d

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
3131
- Fixed `NetworkAnimator` issue where the host client was receiving the ClientRpc animation updates when the host was the owner.(#2309)
3232
- Fixed `NetworkAnimator` issue with using pooled objects and when specific properties are cleaned during despawn and destroy.(#2309)
3333
- Fixed issue where `NetworkAnimator` was checking for animation changes when the associated `NetworkObject` was not spawned.(#2309)
34+
- Corrected an issue with the documentation for BufferSerializer (#2401)
3435

3536
## [1.2.0] - 2022-11-21
3637

com.unity.netcode.gameobjects/Runtime/Serialization/BufferSerializer.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ namespace Unity.Netcode
77
/// <summary>
88
/// Two-way serializer wrapping FastBufferReader or FastBufferWriter.
99
///
10-
/// Implemented as a ref struct for two reasons:
11-
/// 1. The BufferSerializer cannot outlive the FBR/FBW it wraps or using it will cause a crash
12-
/// 2. The BufferSerializer must always be passed by reference and can't be copied
10+
/// Implemented as a ref struct to help enforce the requirement that
11+
/// the BufferSerializer cannot outlive the FBR/FBW it wraps or using it will cause a crash
1312
///
14-
/// Ref structs help enforce both of those rules: they can't ref live the stack context in which they were
15-
/// created, and they're always passed by reference no matter what.
16-
///
17-
/// BufferSerializer doesn't wrapp FastBufferReader or FastBufferWriter directly because it can't.
13+
/// BufferSerializer doesn't wrap FastBufferReader or FastBufferWriter directly because it can't.
1814
/// ref structs can't implement interfaces, and in order to be able to have two different implementations with
1915
/// the same interface (which allows us to avoid an "if(IsReader)" on every call), the thing directly wrapping
2016
/// the struct has to implement an interface. So IReaderWriter exists as the interface,

0 commit comments

Comments
 (0)