Skip to content

fix: Corrects an error in BufferSerializer documentaiton #2401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
- Fixed `NetworkAnimator` issue where the host client was receiving the ClientRpc animation updates when the host was the owner.(#2309)
- Fixed `NetworkAnimator` issue with using pooled objects and when specific properties are cleaned during despawn and destroy.(#2309)
- Fixed issue where `NetworkAnimator` was checking for animation changes when the associated `NetworkObject` was not spawned.(#2309)
- Corrected an issue with the documentation for BufferSerializer (#2401)

## [1.2.0] - 2022-11-21

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