protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new TargetingJob { Random = new Random((uint)UnityEngine.Random.Range(1, 100000)) }; return(job.Schedule(this, inputDeps)); }
//EndSimulationEntityCommandBufferSystem bufferSystem; //protected override void OnCreate() //{ // bufferSystem = World.GetOrCreateSystem<EndSimulationEntityCommandBufferSystem>(); // base.OnCreate(); //} protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new TargetingJob();// { commands = bufferSystem.CreateCommandBuffer().ToConcurrent() }; return(job.Schedule(this, inputDeps)); }