Parameter | Description |
---|---|
progress | Progress state object that will receive updates during integration. |
Configures progress tracking for integration operations.
Sets up progress reporting for long-running integration operations. The integrator updates the progress state during execution, allowing external systems to display progress information and handle cancellation requests.
The progress reporter provides:
Additional resources: BakeProgressState.Progress, BakeProgressState.Cancel.
var integrator = new RadeonRaysProbeIntegrator(); using var progress = new BakeProgressState(); integrator.SetProgressReporter(progress);
// Start integration in background var integrationTask = Task.Run(() => { return integrator.IntegrateDirectRadiance(context, 0, 1000, 2048, false, outputBuffer); });
// Monitor progress while (!integrationTask.IsCompleted) { float currentProgress = progress.Progress(); Debug.Log($"Integration progress: {currentProgress * 100:F1}%");
// Allow user to cancel if (userRequestedCancel) { progress.Cancel(); }
await Task.Delay(100); }
var result = await integrationTask;