Created
October 23, 2018 14:40
-
-
Save tsubaki/262d72a1fb69e8c158ffa7bc8c84c0f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using Unity.Entities; | |
using Unity.Jobs; | |
public class TestSystem1 : JobComponentSystem | |
{ | |
protected override JobHandle OnUpdate(JobHandle inputDeps) | |
{ | |
return new Process().ScheduleSingle(this, inputDeps); | |
} | |
struct Process : IJobProcessComponentData<SampleData1> | |
{ | |
public void Execute(ref SampleData1 data) | |
{ | |
Debug.Log("sample1"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using Unity.Entities; | |
using Unity.Jobs; | |
public class TestSystem2 : JobComponentSystem | |
{ | |
protected override JobHandle OnUpdate(JobHandle inputDeps) | |
{ | |
return new Process().ScheduleSingle(this, inputDeps); | |
} | |
struct Process : IJobProcessComponentData<SampleData2> | |
{ | |
public void Execute(ref SampleData2 data) | |
{ | |
Debug.Log("sample2"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment