private void AsyncPathProbe() { int probeSize = this.probeSize; pathProbeJob.Reset(null); for (int i = 0; i != brains.Count; i++) { ClampBrainIndex(ref nextPathProbeBrain); Navigator component = brains[nextPathProbeBrain].GetComponent <Navigator>(); IncrementBrainIndex(ref nextPathProbeBrain); if ((UnityEngine.Object)component != (UnityEngine.Object)null) { component.executePathProbeTaskAsync = true; component.PathProber.potentialCellsPerUpdate = this.probeSize; component.pathProbeTask.Update(); pathProbeJob.Add(component.pathProbeTask); if (pathProbeJob.Count == probeCount) { break; } } } CPUBudget.Start(this); GlobalJobManager.Run(pathProbeJob); CPUBudget.End(this); }
public void TriggerComplete() { runtime = time.ElapsedTicks; if (budget != null && FastTrackMod.GameRunning) { lock (CPU_BUDGET_LOCK) { CPUBudget.End(budget); } } Instance?.OnPathComplete(this); }