Skip to content

Commit e469f65

Browse files
Merge branch 'develop-2.0.0' into fix/avoid-unnecessry-gc-alloc
2 parents 7bfa720 + ef2fbe8 commit e469f65

File tree

80 files changed

+1781
-853
lines changed

Some content is hidden

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

80 files changed

+1781
-853
lines changed

.yamato/_triggers.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,20 @@
4545
# Since standards job is a part of initial checks it's not present as direct dependency here!!!!!!!!!!!!!!!!!!!!
4646
pull_request_trigger:
4747
name: Pull Request Trigger (develop, develop-2.0.0, & release branches)
48+
# Run the following tests on a selection of different desktop platforms
4849
dependencies:
49-
# Run package EditMode and Playmode package tests on trunk
50-
- .yamato/_run-all.yml#run_all_package_tests_trunk
51-
# Run package EditMode and Playmode package tests on minimum supported editor (6000.0 in case of NGOv2.X)
52-
- .yamato/_run-all.yml#run_all_package_tests_6000
53-
# Run project EditMode and Playmode project tests on trunk
54-
- .yamato/_run-all.yml#run_all_project_tests_trunk
55-
# Run project EditMode and Playmode project tests on minimum supported editor (6000.0 in case of NGOv2.X)
56-
- .yamato/_run-all.yml#run_all_project_tests_6000
57-
# Run standalone test. Run windows standalone tests as this is our most common platform, and run ubuntu rust tests.
50+
# Run package EditMode and Playmode package tests on trunk and an older supported editor (6000.0)
51+
- .yamato/package-tests.yml#package_test_-_ngo_trunk_mac
52+
- .yamato/package-tests.yml#package_test_-_ngo_6000.0_win
53+
54+
# Run testproject EditMode and Playmode project tests on trunk and an older supported editor (6000.0)
55+
- .yamato/project-tests.yml#test_testproject_win_trunk
56+
- .yamato/project-tests.yml#test_testproject_mac_6000.0
57+
58+
# Run standalone test. We run it only on Ubuntu since it's the fastest machine, and it was noted that for example distribution on macOS is taking 40m since we switched to Apple Silicon
5859
# Coverage on other standalone machines is present in Nightly job so it's enough to not run all of them for PRs
5960
- .yamato/desktop-standalone-tests.yml#desktop_standalone_test_testproject_win_il2cpp_6000.0
60-
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_6000.0
61+
- .yamato/cmb-service-standalone-tests.yml#cmb_service_standalone_test_testproject_ubuntu_il2cpp_trunk
6162
triggers:
6263
cancel_old_ci: true
6364
pull_requests:

.yamato/project.metafile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# The small agent was created to handle jobs that don't involve running Unity and are in general super light when it comes to resource usage (for example pack job).
2020
# It uses ubuntu since Linux VMs are faster and cheaper to provision than Mac or Windows Virtual Machines (VMs).
2121
# The b1.small flavour is nearly always sufficient for jobs that don’t involve running Unity Editor.
22-
small_agent_platform:
22+
small_agent_platform:
2323
- name: ubuntu
2424
type: Unity::VM
2525
image: package-ci/ubuntu-22.04:v4
@@ -40,7 +40,7 @@ test_platforms:
4040
image: package-ci/ubuntu-22.04:v4
4141
flavor: b1.large
4242
standalone: StandaloneLinux64
43-
desktop:
43+
desktop:
4444
- name: ubuntu
4545
type: Unity::VM
4646
image: package-ci/ubuntu-22.04:v4
@@ -146,7 +146,7 @@ test_platforms:
146146
image: package-ci/win10-xbox:v4
147147
flavor: b1.large
148148
standalone: GameCoreScarlett
149-
149+
150150
# EDITOR CONFIGURATIONS-------------------------------------------------------------------------------
151151
# Editors to be used for testing. NGOv2.X official support started from 6000.0 editor
152152
# TODO: When a new editor will be released it should be added to this list
@@ -156,13 +156,14 @@ validation_editors:
156156
- trunk
157157
all:
158158
- 6000.0
159-
- 6000.1
159+
- 6000.1
160+
- 6000.2
160161
- trunk
161-
162-
162+
163+
163164
# Scripting backends used by Standalone RunTimeTests---------------------------------------------------
164165

165-
scripting_backends:
166+
scripting_backends:
166167
- mono
167168
- il2cpp
168169

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,25 @@ Additional documentation and release notes are available at [Multiplayer Documen
1010

1111
### Added
1212

13+
- Added serializer for `Pose` (#3546)
1314
- Added methods `GetDefaultNetworkSettings` and `GetDefaultPipelineConfigurations` to `UnityTransport`. These can be used to retrieve the default settings and pipeline stages that are used by `UnityTransport`. This is useful when providing a custom driver constructor through `UnityTransport.s_DriverConstructor`, since it allows reusing or tuning the existing configuration instead of trying to recreate it. This means a transport with a custom driver can now easily benefit from most of the features of `UnityTransport`, like integration with the Network Simulator and Network Profiler from the multiplayer tools package. (#3501)
1415
- Added mappings between `ClientId` and `TransportId`. (#3516)
1516
- Added `NetworkPrefabInstanceHandlerWithData<T>`, a variant of `INetworkPrefabInstanceHandler` that provides access to custom instantiation data directly within the `Instantiate()` method. (#3430)
1617

1718
### Fixed
1819

20+
- Fixed regression issue in v2.x where `NetworkObject.GetNetworkBehaviourAtOrderIndex` was converted from public to internal. (#3541)
21+
- Fixed ensuring OnValueChanged callback is still triggered on the authority when a collection changes and then reverts to the previous value in the same frame. (#3539)
1922
- Fixed synchronizing the destroyGameObject parameter to clients for InScenePlaced network objects. (#3514)
2023
- Fixed distributed authority related issue where enabling the `NetworkObject.DestroyWithScene` would cause errors when a destroying non-authority instances due to loading (single mode) or unloading scene events. (#3500)
2124

2225
### Changed
2326

27+
## [2.4.4] - 2025-07-07
28+
29+
### Added
30+
31+
- Added documentation to package repository.
2432

2533
## [2.4.3] - 2025-06-25
2634

com.unity.netcode.gameobjects/Documentation~/TableOfContents.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
* [Reliability](advanced-topics/message-system/reliability.md)
5656
* [RPC params](advanced-topics/message-system/rpc-params.md)
5757
* [RPC vs NetworkVariables](learn/rpcvnetvar.md)
58-
* [RPC and NetworkVariable examples](learn/rpcnetvarexamples.md)
5958
* [RPC compatibility](advanced-topics/message-system/rpc-compatibility.md)
6059
* [Custom messages](advanced-topics/message-system/custom-messages.md)
6160
* [Connection events](advanced-topics/connection-events.md)
@@ -94,3 +93,11 @@
9493
* [Troubleshooting](troubleshooting/troubleshooting.md)
9594
* [Error messages](troubleshooting/error-messages.md)
9695
* [FAQ](learn/faq.md)
96+
* [Samples](samples.md)
97+
* [Boss Room](samples/bossroom/bossroom-landing.md)
98+
- [Boss Room](samples/bossroom/getting-started-boss-room.md)
99+
- [Boss Room architecture](samples/bossroom/architecture.md)
100+
* [NetworkObject parenting](samples/bossroom/networkobject-parenting.md)
101+
* [Optimizing Boss Room](samples/bossroom/optimizing-bossroom.md)
102+
* [NetworkRigidbody](samples/bossroom/networkrigidbody.md)
103+
* [Spawn NetworkObjects](samples/bossroom/spawn-networkobjects.md)

com.unity.netcode.gameobjects/Documentation~/advanced-topics/bufferserializer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BufferSerializer
22

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:
3+
`BufferSerializer<TReaderWriter>` is the bi-directional serializer primarily used for serializing within [`INetworkSerializable`](serialization/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:
44

55
- 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
66
- `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`

com.unity.netcode.gameobjects/Documentation~/advanced-topics/client-anticipation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Client anticipation uses `AnticipatedNetworkVariable<T>` and `AnticipatedNetwork
66

77
## Overview
88

9-
Games with a server-authoritative architecture often face the problem of making the game feel responsive despite [latency](../learn/ladandpacketloss.md). For example, when a user wants to change the color of an object from green to blue they click a button in the UI, an RPC is sent to the server, and the server changes the object to blue. From the client's perspective, the object doesn't change to blue until the server responds to that message, resulting in a perceived delay for the user.
9+
Games with a server-authoritative architecture often face the problem of making the game feel responsive despite [latency](../learn/lagandpacketloss.md). For example, when a user wants to change the color of an object from green to blue they click a button in the UI, an RPC is sent to the server, and the server changes the object to blue. From the client's perspective, the object doesn't change to blue until the server responds to that message, resulting in a perceived delay for the user.
1010

1111
![](../images/sequence_diagrams/Anticipation/ServerAuthoritative.png)
1212

com.unity.netcode.gameobjects/Documentation~/advanced-topics/custom-serialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static class SerializationExtensions
3939

4040
The code generation for RPCs will automatically pick up and use these functions, and they'll become available via `FastBufferWriter` and `FastBufferReader` directly.
4141

42-
You can also optionally use the same method to add support for `BufferSerializer<TReaderWriter>.SerializeValue()`, if you wish, which will make this type readily available within [`INetworkSerializable`](/advanced-topics/serialization/inetworkserializable.md) types:
42+
You can also optionally use the same method to add support for `BufferSerializer<TReaderWriter>.SerializeValue()`, if you wish, which will make this type readily available within [`INetworkSerializable`](serialization/inetworkserializable.md) types:
4343

4444
```csharp
4545
// The class name doesn't matter here.

com.unity.netcode.gameobjects/Documentation~/advanced-topics/fastbufferwriter-fastbufferreader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ For performance reasons, by default, `FastBufferReader` and `FastBufferWriter` *
121121
> **In editor mode and development builds**, calling these functions records a watermark point, and any attempt to read or write past the watermark point will throw an exception. This ensures these functions are used properly, while avoiding the performance cost of per-operation checking in production builds. In production builds, attempting to read or write past the end of the buffer will cause undefined behavior, likely program instability and/or crashes.
122122
123123

124-
For convenience, every `WriteValue()` and `ReadValue()` method has an equivalent `WriteValueSafe()` and `ReadValueSafe()` that does bounds checking for you, throwing `OverflowException` if the boundary is exceeded. Additionally, some methods, such as arrays (where the amount of data being read can't be known until the size value is read) and [`INetworkSerializable`](inetworkserializable.md) values (where the size can't be predicted outside the implementation) will always do bounds checking internally.
124+
For convenience, every `WriteValue()` and `ReadValue()` method has an equivalent `WriteValueSafe()` and `ReadValueSafe()` that does bounds checking for you, throwing `OverflowException` if the boundary is exceeded. Additionally, some methods, such as arrays (where the amount of data being read can't be known until the size value is read) and [`INetworkSerializable`](serialization/inetworkserializable.md) values (where the size can't be predicted outside the implementation) will always do bounds checking internally.
125125

126126
## Bitwise Reading and Writing
127127

com.unity.netcode.gameobjects/Documentation~/advanced-topics/message-system/rpc.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,3 @@ There are a few other parameters that can be passed to either the `Rpc` attribut
218218
## Additional resources
219219

220220
* [RPC parameters](rpc-params.md)
221-
* [Boss Room RPC Examples](../../learn/bossroom/bossroom-actions.md)

com.unity.netcode.gameobjects/Documentation~/advanced-topics/object-pooling.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ You can register your own spawn handlers by including the `INetworkPrefabInstanc
1616
```
1717
Netcode will use the `Instantiate` and `Destroy` methods in place of default spawn handlers for the `NetworkObject` used during spawning and despawning. Because the message to instantiate a new `NetworkObject` originates from a Host or Server, both won't have the Instantiate method invoked. All clients (excluding a Host) will have the instantiate method invoked if the `INetworkPrefabInstanceHandler` implementation is registered with `NetworkPrefabHandler` (`NetworkManager.PrefabHandler`) and a Host or Server spawns the registered/associated `NetworkObject`.
1818

19+
<!-- Commenting this out until we can get external code references working
20+
1921
The following example is from the Boss Room Sample. It shows how object pooling is used to handle the different projectile objects. In that example, the class `NetworkObjectPool` is the data structure containing the pooled objects and the class `PooledPrefabInstanceHandler` is the handler implementing `INetworkPrefabInstanceHandler`.
2022
2123
```csharp reference
2224
https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/v2.2.0/Assets/Scripts/Infrastructure/NetworkObjectPool.cs
2325
```
2426
2527
Let's have a look at `NetworkObjectPool` first. `PooledPrefabsList` has a list of prefabs to handle, with an initial number of instances to spawn for each. The `RegisterPrefabInternal` method, called in `OnNetworkSpawn`, initializes the different pools for each Prefab as `ObjectPool`s inside the `m_PooledObjects` dictionary. It also instantiates the handlers for each Prefab and registers them. To use these objects, a user then needs to obtain it via the `GetNetworkObject` method before spawning it, then return the object to the pool after use with `ReturnNetworkObject` before despawning it. This only needs to be done on the server, as the `PooledPrefabInstanceHandler` will handle it on the client(s) when the network object's `Spawn` or `Despawn` method is called, via its `Instantiate` and `Destroy` methods. Inside those methods, the `PooledPrefabInstanceHandler` simply calls the pool to get the corresponding object, or to return it.
28+
29+
-->

0 commit comments

Comments
 (0)