Skip to content

Commit 70c3771

Browse files
committed
Adding docs to 1.13
1 parent 7ed7a52 commit 70c3771

File tree

404 files changed

+11791
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404 files changed

+11791
-26
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
* [Netcode for GameObjects package](index.md)
2+
* [Install](install.md)
3+
* [Get started with NGO](tutorials/get-started-with-ngo.md)
4+
* [Configuration](configuration.md)
5+
* [Network topologies](network-topologies.md)
6+
* [Network topologies](terms-concepts/network-topologies.md)
7+
* [Client-server](terms-concepts/client-server.md)
8+
* [Listen server host architecture](learn/listenserverhostarchitecture.md)
9+
* [Configuring connections](configure-connections.md)
10+
* [Connection approval](basics/connection-approval.md)
11+
* [Max players](basics/maxnumberplayers.md)
12+
* [Transports](advanced-topics/transports.md)
13+
* [Relay](relay/relay.md)
14+
* [Network components](network-components.md)
15+
* [NetworkObject](basics/networkobject.md)
16+
* [NetworkObject parenting](advanced-topics/networkobject-parenting.md)
17+
* [NetworkBehaviour](networkbehaviour-landing.md)
18+
* [NetworkBehaviour](basics/networkbehaviour.md)
19+
* [Synchronize](basics/networkbehaviour-synchronize.md)
20+
* [Physics](advanced-topics/physics.md)
21+
* [NetworkManager](components/networkmanager.md)
22+
* [NetworkTransform](components/networktransform.md)
23+
* [NetworkAnimator](components/networkanimator.md)
24+
* [Ownership](basics/ownership.md)
25+
* [Spawning and despawning](spawn-despawn.md)
26+
* [Object spawning](basics/object-spawning.md)
27+
* [Object pooling](advanced-topics/object-pooling.md)
28+
* [Object visibility](basics/object-visibility.md)
29+
* [Spawning synchronization](basics/spawning-synchronization.md)
30+
* [Latency and performance](latency-performance.md)
31+
* [Lag and packet loss](learn/lagandpacketloss.md)
32+
* [Ticks and update rates](learn/ticks-and-update-rates.md)
33+
* [Client-side interpolation](learn/clientside-interpolation.md)
34+
* [Client anticipation](advanced-topics/client-anticipation.md)
35+
* [Dealing with latency](learn/dealing-with-latency.md)
36+
* [Network synchronization](network-synchronization.md)
37+
* [Ways to synchronize](advanced-topics/ways-to-synchronize.md)
38+
* [NetworkVariables](networkvariables-landing.md)
39+
* [NetworkVariable](basics/networkvariable.md)
40+
* [Custom NetworkVariables](basics/custom-networkvariables.md)
41+
* [Remote procedure calls (RPCs)](rpc-landing.md)
42+
* [Messaging system](advanced-topics/messaging-system.md)
43+
* [RPC](advanced-topics/message-system/rpc.md)
44+
* [Reliability](advanced-topics/message-system/reliability.md)
45+
* [RPC params](advanced-topics/message-system/rpc-params.md)
46+
* [RPC vs NetworkVariables](learn/rpcvnetvar.md)
47+
* [RPC and NetworkVariable examples](learn/rpcnetvarexamples.md)
48+
* [RPC compatibility](advanced-topics/message-system/rpc-compatibility.md)
49+
* [Custom messages](advanced-topics/message-system/custom-messages.md)
50+
* [Connection events](advanced-topics/connection-events.md)
51+
* [Network update loop](network-update-loop.md)
52+
* [About network update loop](advanced-topics/network-update-loop-system/index.md)
53+
* [Network update loop reference](advanced-topics/network-update-loop-system/network-update-loop-reference.md)
54+
* [Network time and ticks](advanced-topics/networktime-ticks.md)
55+
* [Serialization](serialization.md)
56+
* [C# primitives](advanced-topics/serialization/cprimitives.md)
57+
* [Unity primitives](advanced-topics/serialization/unity-primitives.md)
58+
* [Enum types](advanced-topics/serialization/enum-types.md)
59+
* [Arrays](advanced-topics/serialization/serialization-arrays.md)
60+
* [INetworkSerializable](advanced-topics/serialization/inetworkserializable.md)
61+
* [Custom serialization](advanced-topics/custom-serialization.md)
62+
* [NetworkObject serialization](advanced-topics/serialization/networkobject-serialization.md)
63+
* [FastBufferWriter and FastBufferReader](advanced-topics/fastbufferwriter-fastbufferreader.md)
64+
* [Scene management](scene-management.md)
65+
* [Scene management overview](basics/scenemanagement/scene-management-overview.md)
66+
* [Integrated management](integrated-management.md)
67+
* [Using NetworkSceneManager](basics/scenemanagement/using-networkscenemanager.md)
68+
* [Scene events](basics/scenemanagement/scene-events.md)
69+
* [Client synchronization mode](basics/scenemanagement/client-synchronization-mode.md)
70+
* [Timing considerations](basics/scenemanagement/timing-considerations.md)
71+
* [In-scene placed NetworkObjects](basics/scenemanagement/inscene-placed-networkobjects.md)
72+
* [Custom management](basics/scenemanagement/custom-management.md)
73+
* [Session management](session-management-landing.md)
74+
* [Session management](advanced-topics/session-management.md)
75+
* [Reconnecting mid-game](advanced-topics/reconnecting-mid-game.md)
76+
* [Testing and debugging](testing-debugging.md)
77+
* [Testing locally](tutorials/testing/testing_locally.md)
78+
* [Testing with artificial conditions](tutorials/testing/testing_with_artificial_conditions.md)
79+
* [Testing client connection management](tutorials/testing/testing_client_connection_management.md)
80+
* [Logging](basics/logging.md)
81+
* [Techniques and tricks for debugging multiplayer games](tutorials/testing/techniques_and_tricks_for_debugging_multiplayer_games.md)
82+
* [Command-line helper](tutorials/command-line-helper.md)
83+
* [Troubleshooting](troubleshooting/troubleshooting.md)
84+
* [Error messages](troubleshooting/error-messages.md)
85+
* [FAQ](learn/faq.md)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# BufferSerializer
2+
3+
`BufferSerializer<TReaderWriter>` is the bi-directional serializer primarily used for serializing within [`INetworkSerializable`](inetworkserializable.md) types. It wraps [`FastBufferWriter` and `FastBufferReader`](fastbufferwriter-fastbufferreader.md) to provide high performance serialization, but has a couple of differences to make it more user-friendly:
4+
5+
- Rather than writing separate methods for serializing and deserializing, `BufferSerializer<TReaderWriter>` allows writing a single method that can handle both operations, which reduces the possibility of a mismatch between the two
6+
- `BufferSerializer<TReaderWriter>` does bound checking on every read and write by default, making it easier to avoid mistakes around manual bounds checking required by `FastBufferWriter` and `FastBufferReader`
7+
8+
These aren't without downsides, however:
9+
10+
- `BufferSerializer<TReaderWriter>` has to operate on an existing mutable value due to its bi-directional nature, which means values like `List<T>.Count` have to be stored to a local variable before writing.
11+
- `BufferSerializer<TReaderWriter>` is slightly slower than `FastBufferReader` and `FastBufferWriter` due to both the extra pass-through method calls and the mandatory bounds checking on each write.
12+
- `BufferSerializer<TReaderWriter>` don't support any form of packed reads and writes.
13+
14+
However, when those downsides are unreasonable, `BufferSerializer<TReaderWriter>` offers two ways to perform more optimal serialization for either performance or bandwidth usage:
15+
16+
- For performance, you can use `PreCheck(int amount)` followed by `SerializeValuePreChecked()` to perform bounds checking for multiple fields at once.
17+
- For both performance and bandwidth usage, you can obtain the wrapped underlying reader/writer via `serializer.GetFastBufferReader()` when `serializer.IsReader` is `true`, and `serializer.GetFastBufferWriter()` when `serializer.IsWriter` is `true`. These provide micro-performance improvements by removing a level of indirection, and also give you a type you can use with `BytePacker` and `ByteUnpacker`.

0 commit comments

Comments
 (0)