protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new MovementDataJob() { chunks = EntityManager.CreateArchetypeChunkArray(query, Allocator.TempJob), PositionDataType = GetArchetypeChunkComponentType <PositionData>(false), // isReadOnly = false DestinationDataType = GetArchetypeChunkComponentType <DestinationData>(false), // isReadOnly = false delta = UnityEngine.Time.deltaTime }; return(job.Schedule(job.chunks.Length, 16, inputDeps)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new MovementDataJob() { chunks = EntityManager.CreateArchetypeChunkArray(query, Allocator.TempJob), PositionDataType = GetArchetypeChunkComponentType <PositionData>(false), // isReadOnly = false DistanceDataType = GetArchetypeChunkComponentType <DistanceFromCameraData>(false), // isReadOnly = false posCamera = cameraTrans.position, dirCamera = cameraTrans.right }; return(job.Schedule(job.chunks.Length, 16, inputDeps)); }