protected override JobHandle OnUpdate(JobHandle inputDeps) { // Deserialize the command type from the reader stream // Execute the RPC inputDeps = JobHandle.CombineDependencies(inputDeps, m_ReceiveSystem.LastDriverWriter); var execJob = new RpcExecJob { commandBuffer = m_Barrier.CreateCommandBuffer().ToConcurrent(), entityType = GetArchetypeChunkEntityType(), connectionType = GetArchetypeChunkComponentType <NetworkStreamConnection>(), inBufferType = GetArchetypeChunkBufferType <IncomingRpcDataStreamBufferComponent>(), outBufferType = GetArchetypeChunkBufferType <OutgoingRpcDataStreamBufferComponent>(), execute = m_RpcData, hashToIndex = m_RpcTypeHashToIndex, driver = m_ReceiveSystem.ConcurrentDriver, reliablePipeline = m_ReceiveSystem.ReliablePipeline, protocolVersion = GetSingleton <NetworkProtocolVersion>() }; var handle = execJob.Schedule(m_RpcBufferGroup, inputDeps); m_Barrier.AddJobHandleForProducer(handle); handle = m_ReceiveSystem.Driver.ScheduleFlushSend(handle); m_ReceiveSystem.LastDriverWriter = handle; return(handle); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { // Deserialize the command type from the reader stream // Execute the RPC var execJob = new RpcExecJob(); execJob.commandBuffer = m_Barrier.CreateCommandBuffer().ToConcurrent(); execJob.entityType = GetArchetypeChunkEntityType(); execJob.bufferType = GetArchetypeChunkBufferType <IncomingRpcDataStreamBufferComponent>(); var handle = execJob.Schedule(m_RpcBufferGroup, inputDeps); m_Barrier.AddJobHandleForProducer(handle); return(handle); }
protected override void OnUpdate() { // Deserialize the command type from the reader stream // Execute the RPC Dependency = JobHandle.CombineDependencies(Dependency, m_ReceiveSystem.LastDriverWriter, m_GhostSimulationGroup.LastGhostMapWriter); var execJob = new RpcExecJob { commandBuffer = m_Barrier.CreateCommandBuffer() .AsParallelWriter(), entityType = GetEntityTypeHandle(), connectionType = GetComponentTypeHandle <NetworkStreamConnection>(), inBufferType = GetBufferTypeHandle <IncomingRpcDataStreamBufferComponent>(), outBufferType = GetBufferTypeHandle <OutgoingRpcDataStreamBufferComponent>(), errors = m_RpcErrors.AsParallelWriter(), execute = m_RpcData, hashToIndex = m_RpcTypeHashToIndex, ghostMap = m_GhostSimulationGroup.SpawnedGhostEntityMap, driver = m_ReceiveSystem.ConcurrentDriver, reliablePipeline = m_ReceiveSystem.ReliablePipeline, protocolVersion = GetSingleton <NetworkProtocolVersion>(), dynamicAssemblyList = m_DynamicAssemblyList }; Dependency = execJob.Schedule(m_RpcBufferGroup, Dependency); m_GhostSimulationGroup.LastGhostMapWriter = Dependency; m_Barrier.AddJobHandleForProducer(Dependency); Dependency = new RpcErrorReportingJob { commandBuffer = m_Barrier.CreateCommandBuffer(), connections = GetComponentDataFromEntity <NetworkStreamConnection>(), errors = m_RpcErrors }.Schedule(Dependency); m_Barrier.AddJobHandleForProducer(Dependency); Dependency = m_ReceiveSystem.Driver.ScheduleFlushSend(Dependency); m_ReceiveSystem.LastDriverWriter = Dependency; }