Instantly share code, notes, and snippets.

Embed
What would you like to do?
using UnityEngine;
using Unity.Entities;
using Unity.Jobs;
using Unity.Collections;
public class TestSystem7 : JobComponentSystem
{
protected override JobHandle OnUpdate(JobHandle inputDeps)
{
var handle1 = new Process1().ScheduleSingle(this, inputDeps);
var handle2 = new Process2().ScheduleSingle(this, inputDeps);
return JobHandle.CombineDependencies(handle1, handle2);
}
struct Process1 : IJobProcessComponentData<SampleData1>
{
public void Execute(ref SampleData1 data)
{
Debug.Log("sample7 p1");
}
}
struct Process2 : IJobProcessComponentData<SampleData2>
{
public void Execute(ref SampleData2 data)
{
Debug.Log("sample7 p2");
}
}
}
using UnityEngine;
using Unity.Entities;
using Unity.Jobs;
using Unity.Collections;
public class TestSystem8 : JobComponentSystem
{
protected override JobHandle OnUpdate(JobHandle inputDeps)
{
var handle1 = new Process1().ScheduleSingle(this, inputDeps);
var handle2 = new Process2().ScheduleSingle(this, inputDeps);
return JobHandle.CombineDependencies(handle1, handle2);
}
struct Process1 : IJobProcessComponentData<SampleData3>
{
public void Execute(ref SampleData3 data)
{
Debug.Log("sample8 p1");
}
}
struct Process2 : IJobProcessComponentData<SampleData4>
{
public void Execute(ref SampleData4 data)
{
Debug.Log("sample8 p2");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment