-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00007de
commit 306be64
Showing
114 changed files
with
15,182 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
id: about | ||
title: About Netcode for GameObjects | ||
description: Overview of Unity's Netcode for GameObjects for your multiplayer networking needs. | ||
--- | ||
|
||
Netcode for GameObjects is a high-level networking library built for Unity for you to abstract networking logic. You can send GameObjects and world data across a networking session to many players at once. With Netcode for GameObjects, you can focus on building your game instead of low-level protocols and networking frameworks. | ||
|
||
To learn more about Netcode for GameObjects functionality and capabilities, explore the content below: | ||
|
||
<!-- | ||
<div className="table-columns-plain" > | ||
| Get Started | Configuration | Samples and Education| | ||
</div> | ||
<div className="table-columns-plain" > | ||
| Networking Components | Spawning and Ownership | Network Synchronization | | ||
</div> | ||
<div className="table-columns-plain" > | ||
| Serialization | Scenes | Sessions | | ||
</div> | ||
<div className="table-columns-plain" > | ||
| Test and Debug | Reference | Related Unity Gaming Services | | ||
</div> | ||
--> | ||
|
||
<div className="table-columns-plain" > | ||
|
||
| Getting Started | Get Started Project | Education and Samples | | ||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| [Install Unity Netcode](installation/installation.md)<br/>[Migration from UNet to Netcode](installation/migratingfromUNet.md)<br/>[Upgrade to Unity Netcode Package](installation/migratingfrommlapi.md) | [Get started with Netcode](../docs/tutorials/get-started-with-ngo.md) | [Boss Room](learn/bossroom/getting-started-boss-room.md)<br/>[Bite Size Samples](learn/bitesize/bitesize-introduction.md)<br/>[Dilmer's Tutorials](community-contributions/dilmer-videos.md) | | ||
|
||
</div> | ||
|
||
<div className="table-columns-plain" > | ||
|
||
| Core Concepts | Debugging | Terminology and FAQs | | ||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| [Networking](basics/connection-approval.md)<br/>[Components](components/networkmanager.md)<br/>[Objects](basics/object-spawning.md)<br/>[Messaging System](advanced-topics/messaging-system.md)<br/>[Serialization](advanced-topics/serialization/serialization-intro.md)<br/>[Scenes](basics/scenemanagement/scene-management-overview.md) | [Logging](basics/logging.md)<br/>[Troubleshooting](troubleshooting/troubleshooting.md)<br/>[Error Messages](troubleshooting/error-messages.md) | [High Level Terminology](terms-concepts/mutliplayer-terms.md)<br/>[Multiplayer Game Architecture](terms-concepts/network-topologies.md)<br/>[FAQs](learn/faq.md) | | ||
|
||
</div> | ||
|
||
For more information, check out [Release Notes](release-notes/ngo-changelog.md) and [APIs](https://docs.unity3d.com/Packages/com.unity.netcode.gameobjects@latest?subfolder=/api/index.html). | ||
|
||
## Before you begin | ||
|
||
Netcode for GameObjects supports the following versions: | ||
|
||
- Unity 6.0+ and later | ||
- Mono and IL2CPP [Scripting Backends](https://docs.unity3d.com/Manual/scripting-backends.html) | ||
|
||
Netcode for GameObjects supports the following platforms: | ||
|
||
- Windows, macOS, and Linux | ||
- iOS and Android | ||
- XR platforms running on Windows, Android, and iOS operating systems | ||
- Most [**closed platforms**](https://unity.com/platform-installation), such as consoles. Contact us for more information about specific closed platforms. | ||
- When working with consoles (such as PlayStation, Xbox, or Nintendo Switch), there may be Netcode-specific policies you should be aware of while testing and before launching your game live. Refer to the console's internal documentation for more information. This content is typically protected by NDA. | ||
- WebGL (requires Netcode for GameObjects 1.2.0+ and Unity Transport 2.0.0+) |
21 changes: 21 additions & 0 deletions
21
versioned_docs/version-2.0.0/advanced-topics/bufferserializer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
id: bufferserializer | ||
title: BufferSerializer | ||
sidebar_label: BufferSerializer | ||
--- | ||
|
||
`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: | ||
|
||
- 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 | ||
- `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` | ||
|
||
These aren't without downsides, however: | ||
|
||
- `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. | ||
- `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. | ||
- `BufferSerializer<TReaderWriter>` don't support any form of packed reads and writes. | ||
|
||
However, when those downsides are unreasonable, `BufferSerializer<TReaderWriter>` offers two ways to perform more optimal serialization for either performance or bandwidth usage: | ||
|
||
- For performance, you can use `PreCheck(int amount)` followed by `SerializeValuePreChecked()` to perform bounds checking for multiple fields at once. | ||
- 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`. |
Oops, something went wrong.