Skip to content

Commit 42f7e23

Browse files
author
Unity Technologies
committed
com.unity.netcode@0.51.0-preview.32
## [0.51.0] - 2022-05-04 ### Changed * Package Dependencies * `com.unity.entities` to version `0.51.0` * Updated transport dependency to 1.0.0. ## [0.50.1] - 2022-03-18 ### Added * Hybrid assemblies will not be included in DOTS Runtime builds. ### Changed * 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. ### Fixed * Fixed an exception in `PhysicsWorldHistory` when enabling lag compensation. * Fixed a rare compile error when source generators found invalid data in the package cache. * Fixed issue that prevent systems been shown in System Hierarchy window. * Fixed an issue where RPCs could be lost in rare cases when sending too many of them. * Fix an incorrect overflow exception when pre-spawned or predicted spawned ghost serialize a subset of the fields.
1 parent 5ae2429 commit 42f7e23

28 files changed

+120
-95
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [0.51.0] - 2022-05-04
4+
5+
### Changed
6+
7+
* Package Dependencies
8+
* `com.unity.entities` to version `0.51.0`
9+
* Updated transport dependency to 1.0.0.
10+
11+
12+
313
## [0.50.1] - 2022-03-18
414

515
### Added
@@ -18,8 +28,6 @@
1828
* Fixed an issue where RPCs could be lost in rare cases when sending too many of them.
1929
* Fix an incorrect overflow exception when pre-spawned or predicted spawned ghost serialize a subset of the fields.
2030

21-
22-
2331
## [0.50.0] - 2021-09-17
2432

2533
### Added

Runtime/Authoring/Hybrid/PreSpawnedGhostsConversion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PreSpawnedGhostsConversion : GameObjectConversionSystem
1919
{
2020
protected override void OnUpdate()
2121
{
22-
var hashToEntity = new NativeHashMap<ulong, Entity>(128, Allocator.TempJob);
22+
var hashToEntity = new NativeParallelHashMap<ulong, Entity>(128, Allocator.TempJob);
2323
// TODO: Check that the GhostAuthoringComponent is interpolated, as we don't support predicted atm
2424
Entities.ForEach((GhostAuthoringComponent ghostAuthoring) =>
2525
{

Runtime/Command/CommandReceiveSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected struct ReceiveJobData
5454
[ReadOnly] public ComponentTypeHandle<NetworkSnapshotAckComponent> snapshotAckType;
5555
[ReadOnly] public ComponentTypeHandle<NetworkIdComponent> networkIdType;
5656
[ReadOnly] public ComponentTypeHandle<CommandTargetComponent> commmandTargetType;
57-
[ReadOnly] public NativeHashMap<SpawnedGhost, Entity> ghostMap;
57+
[ReadOnly] public NativeParallelHashMap<SpawnedGhost, Entity> ghostMap;
5858

5959
public uint serverTick;
6060
public NetDebug netDebug;

Runtime/Gen/GeneratorShared.dll

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

Runtime/NetDebugSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ public NetDebug.LogLevelType LogLevel
4040

4141
#if NETCODE_DEBUG
4242
private BeginSimulationEntityCommandBufferSystem m_Barrier;
43-
public NativeHashMap<int, FixedString128Bytes> ComponentTypeNameLookup { get; private set; }
43+
public NativeParallelHashMap<int, FixedString128Bytes> ComponentTypeNameLookup { get; private set; }
4444
#endif
4545

4646
protected override void OnCreate()
4747
{
4848
m_NetDebug.Initialize();
4949
#if NETCODE_DEBUG
5050
m_Barrier = World.GetOrCreateSystem<BeginSimulationEntityCommandBufferSystem>();
51-
ComponentTypeNameLookup = new NativeHashMap<int, FixedString128Bytes>(1024, Allocator.Persistent);
51+
ComponentTypeNameLookup = new NativeParallelHashMap<int, FixedString128Bytes>(1024, Allocator.Persistent);
5252
#else
5353
Enabled = false;
5454
#endif

Runtime/Rpc/IRpcCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public struct RpcSerializerState
1616

1717
public struct RpcDeserializerState
1818
{
19-
public NativeHashMap<SpawnedGhost, Entity> ghostMap;
19+
public NativeParallelHashMap<SpawnedGhost, Entity> ghostMap;
2020
}
2121

2222
public interface IRpcCommandSerializer<T> where T: struct, IComponentData

Runtime/Rpc/RpcQueue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public struct RpcQueue<TActionSerializer, TActionRequest>
1111
where TActionSerializer : struct, IRpcCommandSerializer<TActionRequest>
1212
{
1313
internal ulong rpcType;
14-
[ReadOnly] internal NativeHashMap<ulong, int> rpcTypeHashToIndex;
14+
[ReadOnly] internal NativeParallelHashMap<ulong, int> rpcTypeHashToIndex;
1515
internal bool dynamicAssemblyList;
1616

1717
public unsafe void Schedule(DynamicBuffer<OutgoingRpcDataStreamBufferComponent> buffer,

Runtime/Rpc/RpcSystem.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public int CompareTo(RpcData other)
9696
private EntityQuery m_RpcBufferGroup;
9797
private BeginSimulationEntityCommandBufferSystem m_Barrier;
9898
private NativeList<RpcData> m_RpcData;
99-
private NativeHashMap<ulong, int> m_RpcTypeHashToIndex;
99+
private NativeParallelHashMap<ulong, int> m_RpcTypeHashToIndex;
100100
private NativeQueue<RpcReceiveError> m_RpcErrors;
101101
private bool m_CanRegister;
102102
private NetDebugSystem m_NetDebugSystem;
@@ -105,7 +105,7 @@ public RpcSystem()
105105
{
106106
m_CanRegister = true;
107107
m_RpcData = new NativeList<RpcData>(16, Allocator.Persistent);
108-
m_RpcTypeHashToIndex = new NativeHashMap<ulong, int>(16, Allocator.Persistent);
108+
m_RpcTypeHashToIndex = new NativeParallelHashMap<ulong, int>(16, Allocator.Persistent);
109109
m_DynamicAssemblyList = DynamicAssemblyList;
110110
}
111111

@@ -202,8 +202,8 @@ struct RpcExecJob : IJobChunk
202202
public BufferTypeHandle<OutgoingRpcDataStreamBufferComponent> outBufferType;
203203
public NativeQueue<RpcReceiveError>.ParallelWriter errors;
204204
[ReadOnly] public NativeList<RpcData> execute;
205-
[ReadOnly] public NativeHashMap<ulong, int> hashToIndex;
206-
[ReadOnly] public NativeHashMap<SpawnedGhost, Entity> ghostMap;
205+
[ReadOnly] public NativeParallelHashMap<ulong, int> hashToIndex;
206+
[ReadOnly] public NativeParallelHashMap<SpawnedGhost, Entity> ghostMap;
207207

208208
[ReadOnly] public ComponentTypeHandle<NetworkSnapshotAckComponent> ackType;
209209
public uint localTime;

Runtime/Snapshot/GhostChunkSerializationState.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,26 +419,26 @@ static public ConnectionStateData Create(Entity connection)
419419
return new ConnectionStateData
420420
{
421421
Entity = connection,
422-
SerializationState = new UnsafeHashMap<ArchetypeChunk, GhostChunkSerializationState>(1024, Allocator.Persistent),
423-
ClearHistory = new UnsafeHashMap<int, uint>(256, Allocator.Persistent),
422+
SerializationState = new UnsafeParallelHashMap<ArchetypeChunk, GhostChunkSerializationState>(1024, Allocator.Persistent),
423+
ClearHistory = new UnsafeParallelHashMap<int, uint>(256, Allocator.Persistent),
424424
#if NETCODE_DEBUG
425425
NetDebugPacket = new NetDebugPacket(),
426426
#endif
427427
GhostStateData = new GhostStateList(1024, 1024, Allocator.Persistent),
428-
AckedPrespawnSceneMap = new UnsafeHashMap<ulong, int>(256, Allocator.Persistent),
428+
AckedPrespawnSceneMap = new UnsafeParallelHashMap<ulong, int>(256, Allocator.Persistent),
429429
m_NewLoadedPrespawnRanges = UnsafeList<PrespawnHelper.GhostIdInterval>.Create(32, Allocator.Persistent),
430430
};
431431
}
432432

433433
public Entity Entity;
434-
public UnsafeHashMap<ArchetypeChunk, GhostChunkSerializationState> SerializationState;
435-
public UnsafeHashMap<int, uint> ClearHistory;
434+
public UnsafeParallelHashMap<ArchetypeChunk, GhostChunkSerializationState> SerializationState;
435+
public UnsafeParallelHashMap<int, uint> ClearHistory;
436436
#if NETCODE_DEBUG
437437
public NetDebugPacket NetDebugPacket;
438438
#endif
439439

440440
public GhostStateList GhostStateData;
441-
public UnsafeHashMap<ulong, int> AckedPrespawnSceneMap;
441+
public UnsafeParallelHashMap<ulong, int> AckedPrespawnSceneMap;
442442
public ref UnsafeList<PrespawnHelper.GhostIdInterval> NewLoadedPrespawnRanges => ref m_NewLoadedPrespawnRanges[0];
443443
private UnsafeList<PrespawnHelper.GhostIdInterval>* m_NewLoadedPrespawnRanges;
444444

0 commit comments

Comments
 (0)