You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
using Unity.Burst;
|
|
|
|
|
|
using Unity.Collections;
|
|
|
|
|
|
using Unity.Jobs;
|
|
|
|
|
|
using Unity.Networking.Transport;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ECSTest
|
|
|
|
|
|
{
|
|
|
|
|
|
[BurstCompile]
|
|
|
|
|
|
public struct ClientUpdateJob : IJob
|
|
|
|
|
|
{
|
|
|
|
|
|
public NetworkDriver driver;
|
|
|
|
|
|
public NetworkPipeline unreliablePipeline;
|
|
|
|
|
|
public NetworkPipeline reliablePipeline;
|
|
|
|
|
|
public NativeReference<NetworkConnection> connection;
|
|
|
|
|
|
|
|
|
|
|
|
public void Execute()
|
|
|
|
|
|
{
|
|
|
|
|
|
NetworkEvent.Type cmd;
|
|
|
|
|
|
while ((cmd = connection.Value.PopEvent(driver, out var stream, out var networkPipeline)) !=
|
|
|
|
|
|
NetworkEvent.Type.Empty)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|