is DOTS Netcode compatible with the new Entities Package "0.1.1" ?

Hello Everyone,

is DOTS Netcode compatible with the new Entities Package “0.1.1” ?

i got these errors on my Project so i tried the “Asteroids” example to get a better idea on how it works but got the Same Errors.

Error 1:

AtomicSafetyNode has either been corrupted or is being accessed on a job which is not allowed.
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle:SetAllowSecondaryVersionWriting_Injected(AtomicSafetyHandle&, Boolean)
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle:SetAllowSecondaryVersionWriting(AtomicSafetyHandle, Boolean)
Unity.Networking.Transport.DataStreamReader:.ctor(DataStreamWriter, Int32, Int32) (at Packages/com.unity.transport/Runtime/DataStream.cs:705)
Unity.Networking.Transport.Concurrent:PopEventForConnection(NetworkConnection, DataStreamReader&) (at Packages/com.unity.transport/Runtime/NetworkDriver.cs:71)
Unity.Networking.Transport.Concurrent:PopEventForConnection(NetworkConnection, DataStreamReader&) (at Packages/com.unity.transport/Runtime/NetworkDriver.cs:1173)
ConnectionReceiveJob:Execute(Entity, Int32, NetworkStreamConnection&, NetworkSnapshotAckComponent&) (at Assets/NetCode/Connection/NetworkStreamReceiveSystem.cs:186)
Unity.Entities.JobStruct_Process_ECC`3:ExecuteChunk(JobStruct_Process_ECC`3&, IntPtr, Int32, Int32, ArchetypeChunk*, Int32*) (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities/IJobForEach.gen.cs:2101)
Unity.Entities.JobStruct_Process_ECC`3:Execute(JobStruct_Process_ECC`3&, IntPtr, IntPtr, JobRanges&, Int32) (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities/IJobForEach.gen.cs:2075)

Error 2:

SetSecondaryVersionAllowWriting node is not valid
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle:SetAllowSecondaryVersionWriting_Injected(AtomicSafetyHandle&, Boolean)
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle:SetAllowSecondaryVersionWriting(AtomicSafetyHandle, Boolean)
Unity.Networking.Transport.DataStreamReader:.ctor(DataStreamWriter, Int32, Int32) (at Packages/com.unity.transport/Runtime/DataStream.cs:705)
Unity.Networking.Transport.Concurrent:PopEventForConnection(NetworkConnection, DataStreamReader&) (at Packages/com.unity.transport/Runtime/NetworkDriver.cs:71)
Unity.Networking.Transport.Concurrent:PopEventForConnection(NetworkConnection, DataStreamReader&) (at Packages/com.unity.transport/Runtime/NetworkDriver.cs:1173)
ConnectionReceiveJob:Execute(Entity, Int32, NetworkStreamConnection&, NetworkSnapshotAckComponent&) (at Assets/NetCode/Connection/NetworkStreamReceiveSystem.cs:186)
Unity.Entities.JobStruct_Process_ECC`3:ExecuteChunk(JobStruct_Process_ECC`3&, IntPtr, Int32, Int32, ArchetypeChunk*, Int32*) (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities/IJobForEach.gen.cs:2101)
Unity.Entities.JobStruct_Process_ECC`3:Execute(JobStruct_Process_ECC`3&, IntPtr, IntPtr, JobRanges&, Int32) (at Library/PackageCache/com.unity.entities@0.1.1-preview/Unity.Entities/IJobForEach.gen.cs:2075)

The new Netcode should only be a week or two away now, I believe. Maybe it will release with Unite LA? I tried the same a good while back, but came to the conclusion it was better to just work with the default entitiy version the multiplayer repository runs with.

1 Like

Awesome Thank you!

another question: is the Netcode optimized Only for FPS games or Any other type ?

im doing a TOP-DOWN battle Royale Game. with only 2 Joysticks as inputs. Movement and Aim
Movement: is always related to the world directions. (2 sbytes that tell which direction the player is taking)
Aim: is controlling the Rotation, Aim and Shoot. (2 sbyes that tell the rotation of the player, if aiming or shooting in a specific direction)
and both inputs are combined to control MoveSpeed, Animations…

by reading the Old Netcode version i came to the conclusion, there is some logics ( applied by default) that are meant for FPS Games and i hope they will be more modular in the future.

eg:
Snapshot: In my case im using the full potential of ECS to do the simulation on all Clients by only sending the Inputs as stream. i know internet is broken and messages can be lost/duplicated or arrive after unpredictable amount of millisecondes. so i prefer using the Snapshot logic to send only Positions once/s.
RenderInterpolation: is Good but i think it can also be more modular to specify which Transform component interpolate.

Note! I am not familiar with the ECS Netcode and maybe the required functionalities are already existing.
i hope Unity will Also Update the ECS Netcode Documentation.

If you haven’t already I recommend you watch this talk from Unite:

1 Like