Skip to content

Commit 916c73e

Browse files
author
Unity Technologies
committed
com.unity.netcode@1.0.8
## [1.0.8] - 2023-04-17 ### Changed * Reduced the amount of memory allocated by allocating based on the maximum number of worker threads the running platform requires rather than defaulting to using a theoretical upper-bound of 128 worker threads. * Removed the additional entity created for each predicted ghost prefab, that was necessary to support predicted spawning. This has the addition benefit to cut almost in half (in case all ghost prefabs support all modes) the number of required archetypes. ### Fixed * An issue with pre-spawned ghost not working correctly because sub-scene hash is calculated differently for client and server * an issue when sub-scene are opened for live-conversion and baking, causing spawned ghosts to contains invalid blob asset references (i.e colliders), introducing potential crashes and other problems (i.e missing collision and mis-prediction) * An issue with baking, not using the correct NetCodeClientTarget (either client or client/server) when baking a sub-scene for a client standalone build. * An issue with the Entities/Build project settings UI that was not updating the ClientTarget to use is the ProjectSettings window was not closed, or another settings "tab" was selected. * An issue with HasServerWorld reporting the presence of a server world even though no server was created.if it's not needed. * A sporadic InvalidOperationException: GetSingleton<Unity.NetCode.LowLevel.SnapshotDataLookupCache>() thrown when retrieving the Unity.NetCode.LowLevel.SnapshotDataLookupCache. * GhostCollectionSystem InvalidOperationException thrown when Ghost prefab validation fails, trying accessing invalidated DynamicBuffer. * An issue in the GhostChunkSerializer, that was overwriting the snapshot data with some enable bits masks. * An issue in the GhostUpdateSystem, that was reading and applying the wrong enable bits. * An issue when restoring enable bits state from the predicted ghost history buffer. * Fixed a "System Creation Order" bug causing components with `[GhostField]` fields (or the `[GhostEnableBit]` attribute) to silently default to the `DontSerializeVariant`, especially in cases where Ghost Prefabs are created at runtime (via `GhostPrefabCreation.ConvertToGhostPrefab`). * "Ghost Registration" and "Default Variant Registration" Systems now use `[CreateBefore(typeof(DefaultVariantSystemGroup))]`, so that user-code can add `[CreateAfter(typeof(DefaultVariantSystemGroup))]` when accessing `GhostComponentSerializerCollectionData` data. * We now also guard all of these calls, giving explicit (fatal) errors if used improperly. * An issue in `GhostDistancePartitioningSystem`, which caused Netcode to add a shared component ECB entry for every single ghost containing a `LocalTransform`, every single frame, when `GhostDistanceImportance` was enabled in a users project. ### Deprecated * Now that the `GhostAuthoringInspectionComponent` shows all replicated components, you shouldn't have to opt-into prefab overrides. Thus, deprecated the `SupportsPrefabOverrides` attribute. ## [1.0.0-pre.66] - 2023-03-21 ### Added * Validate and sanitise connect and listen addresses when using IPCNetworkInterface. That was causing some nasty crash in the Transport without users understanding the actual problem. ### Changed * The following components have been renamed: NetworkSnapshotAckComponent: NetworkSnapshotAck, IncomingSnapshotDataStreamBufferComponent: IncomingSnapshotDataStreamBuffer, IncomingRpcDataStreamBufferComponent: IncomingRpcDataStreamBuffer, OutgoingRpcDataStreamBufferComponent: OutgoingRpcDataStreamBuffer, IncomingCommandDataStreamBufferComponent: IncomingCommandDataStreamBuffer, OutgoingCommandDataStreamBufferComponent: OutgoingCommandDataStreamBuffer, NetworkIdComponent: NetworkId, CommandTargetComponent: CommandTarget, GhostComponent: GhostInstance, GhostChildEntityComponent: GhostChildEntity, GhostOwnerComponent: GhostOwner, PredictedGhostComponent: PredictedGhost, GhostTypeComponent: GhostType, SharedGhostTypeComponent: GhostTypePartition, GhostCleanupComponent: GhostCleanup, GhostPrefabMetaDataComponent: GhostPrefabMetaData, PredictedGhostSpawnRequestComponent: PredictedGhostSpawnRequest, PendingSpawnPlaceholderComponent: PendingSpawnPlaceholder, ReceiveRpcCommandRequestComponent: ReceiveRpcCommandRequest, SendRpcCommandRequestComponent: SendRpcCommandRequest, MetricsMonitorComponent: MetricsMonitor, ### Removed * internal ListenAsync/ConnectAsync methods (no visible API changes for users) ### Fixed * a very unfrequent exception thrown in presence of a ghost with a replicated component that does not present any prediction errors names (i.e an Entity reference). * source generator crash when logging missing assembly dependency. * source generator requiring Unity.Transport package dependency for generating serialization code. * Snapshot history buffer not restore correctly, causing entities component to be stomped with random data. * Fixed an issue when ClientServerBootstrap.AutoConnectPort is 0 indicating autoconnecting should be disabled and you will connect manually via the driver connect API, but the playmode tools ip/port fields would still triggering (so you get two connections set up and errors). We also now prevent attempts to make a connection while one is already established. * an issue with source generator, validating incorrectly custom templates that uses overrides. * removed warning for old temp allocation when converting sub-scene with pre-spawned ghosts. * Forced all `ICommandData`'s `InternalBufferCapacity` to be zero, because we were constantly wasting hundreds of bytes per entity to store data that we know for certain will not fit into the internal capacity (as the dynamic buffer required length is hardcoded to 64, for netcode input buffers). * Fixed potential crash in players when send queue is full * Fixed exceptions when trying to use invalid interpolation ticks (could happen during snapshot updates or in predicted spawning system on disconnection)
1 parent 35d83c0 commit 916c73e

File tree

79 files changed

+1351
-943
lines changed

Some content is hidden

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

79 files changed

+1351
-943
lines changed

.buginfo

Lines changed: 0 additions & 4 deletions
This file was deleted.

.footignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 98 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,70 @@
11
# Changelog
22

3-
## [1.0.0-pre.65] - 2023-03-21
3+
## [1.0.8] - 2023-04-17
4+
5+
### Changed
6+
7+
* Reduced the amount of memory allocated by allocating based on the maximum number of worker threads the running platform requires rather than defaulting to using a theoretical upper-bound of 128 worker threads.
8+
* Removed the additional entity created for each predicted ghost prefab, that was necessary to support predicted spawning. This has the addition benefit to cut almost in half (in case all ghost prefabs support all modes) the number of required archetypes.
9+
10+
11+
### Fixed
12+
13+
* An issue with pre-spawned ghost not working correctly because sub-scene hash is calculated differently for client and server
14+
* an issue when sub-scene are opened for live-conversion and baking, causing spawned ghosts to contains invalid blob asset references (i.e colliders), introducing potential crashes and other problems (i.e missing collision and mis-prediction)
15+
* An issue with baking, not using the correct NetCodeClientTarget (either client or client/server) when baking a sub-scene for a client standalone build.
16+
* An issue with the Entities/Build project settings UI that was not updating the ClientTarget to use is the ProjectSettings window was not closed, or another settings "tab" was selected.
17+
* An issue with HasServerWorld reporting the presence of a server world even though no server was created.if it's not needed.
18+
* A sporadic InvalidOperationException: GetSingleton<Unity.NetCode.LowLevel.SnapshotDataLookupCache>() thrown when retrieving the Unity.NetCode.LowLevel.SnapshotDataLookupCache.
19+
* GhostCollectionSystem InvalidOperationException thrown when Ghost prefab validation fails, trying accessing invalidated DynamicBuffer.
20+
* An issue in the GhostChunkSerializer, that was overwriting the snapshot data with some enable bits masks.
21+
* An issue in the GhostUpdateSystem, that was reading and applying the wrong enable bits.
22+
* An issue when restoring enable bits state from the predicted ghost history buffer.
23+
* Fixed a "System Creation Order" bug causing components with `[GhostField]` fields (or the `[GhostEnableBit]` attribute) to silently default to the `DontSerializeVariant`, especially in cases where Ghost Prefabs are created at runtime (via `GhostPrefabCreation.ConvertToGhostPrefab`).
24+
* "Ghost Registration" and "Default Variant Registration" Systems now use `[CreateBefore(typeof(DefaultVariantSystemGroup))]`, so that user-code can add `[CreateAfter(typeof(DefaultVariantSystemGroup))]` when accessing `GhostComponentSerializerCollectionData` data.
25+
* We now also guard all of these calls, giving explicit (fatal) errors if used improperly.
26+
* An issue in `GhostDistancePartitioningSystem`, which caused Netcode to add a shared component ECB entry for every single ghost containing a `LocalTransform`, every single frame, when `GhostDistanceImportance` was enabled in a users project.
27+
28+
29+
### Deprecated
30+
31+
* Now that the `GhostAuthoringInspectionComponent` shows all replicated components, you shouldn't have to opt-into prefab overrides. Thus, deprecated the `SupportsPrefabOverrides` attribute.
32+
33+
34+
## [1.0.0-pre.66] - 2023-03-21
435

536
### Added
637

7-
* validate and sanitise connect and listen addresses when using IPCNetworkInterface. That was causing some nasty crash in the Transport without users understanding the actual problem.
38+
* Validate and sanitise connect and listen addresses when using IPCNetworkInterface. That was causing some nasty crash in the Transport without users understanding the actual problem.
839

940
### Changed
1041

11-
* the following components has been renamed: | Original Name | New Name | | ---------------| ---------------| |NetworkSnapshotAckComponent| NetworkSnapshotAck | |IncomingSnapshotDataStreamBufferComponent| IncomingSnapshotDataStreamBuffer | |IncomingRpcDataStreamBufferComponent| IncomingRpcDataStreamBuffer | |OutgoingRpcDataStreamBufferComponent| OutgoingRpcDataStreamBuffer | |IncomingCommandDataStreamBufferComponent| IncomingCommandDataStreamBuffer | |OutgoingCommandDataStreamBufferComponent|OutgoingCommandDataStreamBuffer| |NetworkIdComponent|NetworkId| |CommandTargetComponent|CommandTarget| |GhostComponent|GhostInstance| |GhostChildEntityComponent|GhostChildEntity| |GhostOwnerComponent|GhostOwner| |PredictedGhostComponent|PredictedGhost| |GhostTypeComponent|GhostType| |SharedGhostTypeComponent|GhostTypePartition| |GhostCleanupComponent|GhostCleanup| |GhostPrefabMetaDataComponent|GhostPrefabMetaData| |PredictedGhostSpawnRequestComponent|PredictedGhostSpawnRequest| |PendingSpawnPlaceholderComponent|PendingSpawnPlaceholder| |ReceiveRpcCommandRequestComponent|ReceiveRpcCommandRequest| |SendRpcCommandRequestComponent|SendRpcCommandRequest| |MetricsMonitorComponent|MetricsMonitor|
42+
* The following components have been renamed:
43+
NetworkSnapshotAckComponent: NetworkSnapshotAck,
44+
IncomingSnapshotDataStreamBufferComponent: IncomingSnapshotDataStreamBuffer,
45+
IncomingRpcDataStreamBufferComponent: IncomingRpcDataStreamBuffer,
46+
OutgoingRpcDataStreamBufferComponent: OutgoingRpcDataStreamBuffer,
47+
IncomingCommandDataStreamBufferComponent: IncomingCommandDataStreamBuffer,
48+
OutgoingCommandDataStreamBufferComponent: OutgoingCommandDataStreamBuffer,
49+
NetworkIdComponent: NetworkId,
50+
CommandTargetComponent: CommandTarget,
51+
GhostComponent: GhostInstance,
52+
GhostChildEntityComponent: GhostChildEntity,
53+
GhostOwnerComponent: GhostOwner,
54+
PredictedGhostComponent: PredictedGhost,
55+
GhostTypeComponent: GhostType,
56+
SharedGhostTypeComponent: GhostTypePartition,
57+
GhostCleanupComponent: GhostCleanup,
58+
GhostPrefabMetaDataComponent: GhostPrefabMetaData,
59+
PredictedGhostSpawnRequestComponent: PredictedGhostSpawnRequest,
60+
PendingSpawnPlaceholderComponent: PendingSpawnPlaceholder,
61+
ReceiveRpcCommandRequestComponent: ReceiveRpcCommandRequest,
62+
SendRpcCommandRequestComponent: SendRpcCommandRequest,
63+
MetricsMonitorComponent: MetricsMonitor,
1264

1365
### Removed
1466

15-
* internal ListenAsync/ConnectAsync methods (no visible API changes for the users)
67+
* internal ListenAsync/ConnectAsync methods (no visible API changes for users)
1668

1769
### Fixed
1870

@@ -41,6 +93,9 @@
4193
* Make EnablePacketLogging component public to allow for per connection debug information.
4294
* Updated `com.unity.transport` dependency to version 2.0.0-pre.6.
4395

96+
### Deprecated
97+
* `ProjectSettings / NetCodeClientTarget` was not actually saved to the ProjectSettings. Instead, it was saved to `EditorPrefs`, breaking build determinism across machines. Now that this has been fixed, your EditorPref has been clobbered, and `ClientSettings.NetCodeClientTarget` has been deprecated (in favour of `NetCodeClientSettings.instance.ClientTarget`).
98+
4499
### Fixed
45100

46101
* An issue with the `NetworkEmulator` in the editor when enabling domain reload (while switching play-mode) that was causing the game to forcibly immediately exit the the play state.
@@ -195,6 +250,45 @@
195250
* The ClientSimulationSystemGroup ServerTick, ServerTickFraction, InterpolationTick and InterpolationTickFraction has been removed. You can retrieve the same properties from the NetworkTime singleton. Please refer to the `NetworkTime` component documentation for further information about the different timing properties and the flags behaviours.
196251

197252

253+
## [0.51.1] - 2022-06-27
254+
255+
### Changed
256+
257+
* Package Dependencies
258+
* `com.unity.entities` to version `0.51.1`
259+
260+
261+
## [0.51.0] - 2022-05-04
262+
263+
### Changed
264+
265+
* Package Dependencies
266+
* `com.unity.entities` to version `0.51.0`
267+
* Updated transport dependency to 1.0.0.
268+
269+
### Added
270+
271+
* prevent the netcode generator running if the assembly compilation that does not references netcode package.
272+
273+
274+
## [0.50.1] - 2022-03-18
275+
276+
### Added
277+
278+
* Hybrid assemblies will not be included in DOTS Runtime builds.
279+
280+
### Changed
281+
282+
* Changed: Tick systems (Initialization, Simulation, Presentation) are not created as part of the default client-server bootstrap for Hybrid and the Client and Server worlds are updated by the PlayerLoop instead.
283+
284+
### Fixed
285+
286+
* Fixed an exception in `PhysicsWorldHistory` when enabling lag compensation.
287+
* Fixed a rare compile error when source generators found invalid data in the package cache.
288+
* Fixed issue that prevent systems been shown in System Hierarchy window.
289+
* Fixed an issue where RPCs could be lost in rare cases when sending too many of them.
290+
* Fix an incorrect overflow exception when pre-spawned or predicted spawned ghost serialize a subset of the fields.
291+
198292

199293
## [0.50.0] - 2021-09-17
200294

Documentation~/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ generated class inside the assembly it pertain and modify it there.
3636
// }
3737
```
3838

39+
## Additional resources
40+
41+
* [Prerelease (1.0.0-pre.65) documentation](pre-release.md)

Documentation~/physics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ When a client only physics world exists, all non-ghost dynamic physics objects c
5656
As part of the entity baking process, a _PhysicsWorldIndex_ shared component is added to all the physics entities, indicating
5757
in which world the entity should be part of.
5858
> [!NOTE]
59-
> It is responsibility of the user to setup properly their prefab using the `PhysicBody` inspector, to make them run in the correct physics world.
59+
> It is the responsibility of the user to setup their prefab properly to make them run in the correct physics world. This can be achieved with the `PhysicsWorldIndexAuthoring` component, provided with the Unity Physics package, which allows setting the physics world index for rigid bodies. For more information, please refer to the [Unity Physics documentation](https://docs.unity3d.com/Packages/com.unity.physics@latest/index.html?subfolder=/manual/).
6060
6161
### Interaction in between predicted and client-only physics entities
6262

Documentation~/pre-release.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Documentation for pre-release versions of com.unity.netcode
2+
3+
Because of idiosyncrasies with which Unity packages are published, it may be possible to see the documentation for the 1.0.0 version of `com.unity.netcode` before the package itself is available. Should you find yourself in that situation, we've made the [pre-release documentation](images/com.unity.netcode@1.0.zip) available. This offline archive contains a snapshot of documentation for the 1.0.0-pre.65 version.

Editor/Authoring/BakedNetCodeComponents.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public ulong VariantHash
7878
/// Denotes if this type supports user modification of <see cref="ComponentTypeSerializationStrategy"/>.
7979
/// We obviously support it "implicitly" if we have multiple variant types.
8080
/// </summary>
81-
public bool DoesAllowVariantModification => serializationStrategy.HasDontSupportPrefabOverridesAttribute == 0 && (serializationStrategy.HasSupportsPrefabOverridesAttribute != 0 || HasMultipleVariants) && serializationStrategy.IsInput == 0;
81+
public bool DoesAllowVariantModification => serializationStrategy.HasDontSupportPrefabOverridesAttribute == 0 && serializationStrategy.IsInput == 0;
8282

8383
/// <summary>
8484
/// Denotes if this type supports user modification of <see cref="SendTypeOptimization"/>.
@@ -88,7 +88,7 @@ public ulong VariantHash
8888
/// <summary>
8989
/// Denotes if this type supports user modification of <see cref="GhostAuthoringInspectionComponent.ComponentOverride.PrefabType"/>.
9090
/// </summary>
91-
public bool DoesAllowPrefabTypeModification => serializationStrategy.HasDontSupportPrefabOverridesAttribute == 0 && serializationStrategy.HasSupportsPrefabOverridesAttribute != 0 && serializationStrategy.IsInput == 0;
91+
public bool DoesAllowPrefabTypeModification => serializationStrategy.HasDontSupportPrefabOverridesAttribute == 0 && serializationStrategy.IsInput == 0;
9292

9393
/// <summary>I.e. Implicitly supports prefab overrides.</summary>
9494
internal bool HasMultipleVariants => availableSerializationStrategies.Length > 1;

Editor/Authoring/EntityPrefabComponentsPreview.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void BakeEntireNetcodePrefab(GhostAuthoringComponent authoringComponent,
2828
{
2929
try
3030
{
31-
EditorUtility.DisplayProgressBar($"Baking '{authoringComponent}'", "Baking allows you to view and modify ghost component meta-data.", .9f);
31+
EditorUtility.DisplayProgressBar($"Baking '{authoringComponent}'...", "Baking triggered by the GhostAuthoringInspectionComponent.", .9f);
3232
GhostAuthoringInspectionComponent.forceBake = false;
3333
GhostAuthoringInspectionComponent.forceSave = true;
3434

Editor/Drawers/BoundingBoxDebugGhostDrawerSystem.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ namespace Unity.NetCode.Samples.Common
1515
{
1616
[UpdateInGroup(typeof(PresentationSystemGroup))]
1717
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation)]
18+
[BurstCompile]
1819
partial class BoundingBoxDebugGhostDrawerClientSystem : SystemBase
1920
{
2021
const string k_ServerColorKey = "BoundingBoxDebugGhostDrawer_ServerColor";

Editor/PrespawnedGhostPreprocessScene.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ namespace Unity.NetCode.Editor
1212
/// To overcome that, the SubSceneWithPrespawnGhosts is added at runtime here and a LiveLinkPrespawnSectionReference
1313
/// is also added ot the scene section enity to provide some misisng information about the section is referring to.
1414
/// </summary>
15-
[GenerateTestsForBurstCompatibility]
1615
[BurstCompile]
1716
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation | WorldSystemFilterFlags.ServerSimulation | WorldSystemFilterFlags.ThinClientSimulation)]
1817
[UpdateInGroup(typeof(InitializationSystemGroup))]

0 commit comments

Comments
 (0)