protected override JobHandle OnUpdate(JobHandle inputDeps) { var moveForwardRotationJob = new MoveToDestinationJob(); moveForwardRotationJob.DeltaTime = Time.DeltaTime; var jobHandle = moveForwardRotationJob.Schedule(this, inputDeps); return(jobHandle); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var navigation = agents.ToComponentDataArray <NavigationData>(Allocator.TempJob); var translations = agents.ToComponentDataArray <Translation>(Allocator.TempJob); var entities = agents.ToEntityArray(Allocator.TempJob); var moveForwardRotationJob = new MoveToDestinationJob { Agents = navigation, Translations = translations, Entities = entities }; var jobHandle = moveForwardRotationJob.Schedule(this, inputDeps); jobHandle.Complete(); navigation.Dispose(); translations.Dispose(); entities.Dispose(); return(jobHandle); }