# AdaptivePerformanceStableFrameModeProvider

> Mode provider that prioritizes consistent frame time over the highest achievable frame rate.

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.AdaptivePerformance](/engine/7000.0/script-reference/unityengine/adaptiveperformance.md)
* **Assembly:** UnityEngine.AdaptivePerformanceModule
* **Implements:** [IAdaptivePerformanceModeProvider](/engine/7000.0/script-reference/unityengine/adaptiveperformance/iadaptiveperformancemodeprovider.md)

```csharp
public class AdaptivePerformanceStableFrameModeProvider : IAdaptivePerformanceModeProvider
```

## Remarks

On mode start the provider reads the AdaptiveFramerate scaler's bounds and pins [Time.maximumDeltaTime](/engine/7000.0/script-reference/unityengine/time/maximumdeltatime.md) to `1 / MinBound` — a physics-stability clamp so a hitch can never stretch a single physics step past the budget.

The provider then forces vsync off ([QualitySettings.vSyncCount](/engine/7000.0/script-reference/unityengine/qualitysettings/vsynccount.md) to 0) and takes ownership of framerate: vsync's snap-to-refresh-divisor behavior turns a missed deadline into a large frame-time spike, exactly the variance this mode fights. It force-enables the AdaptiveFramerate scaler, starts [Application.targetFrameRate](/engine/7000.0/script-reference/unityengine/application/targetframerate.md) at MaxBound, and lets the scaler participate in the indexer's cost-based adjustment so the framerate seeks the highest stably-reachable rate (MinBound is the floor). The original vsync count, framerate, and maximum delta time are all restored on mode end.

Each frame it produces a performance action and adopts whichever signal asks for the most aggressive change. A headroom guard runs on every frame regardless of vsync: it asks for a decrease when CPU/GPU work climbs toward the presented frame interval, which is one load bump from a dropped frame. Alongside it a variance signal runs, whose source depends on whether presentation is vsync-locked. When it is (mobile always is — its compositor paces frames at the hardware level regardless of [QualitySettings.vSyncCount](/engine/7000.0/script-reference/unityengine/qualitysettings/vsynccount.md)), wall-clock frame time quantizes to the display cadence and its variance goes blind until a frame drops, so the provider measures variance on CPU/GPU work time. When it isn't, wall-clock frame time is authoritative and its variance is measured directly. Both paths also honor the MinBound floor via [AdaptivePerformanceStableFrameModeProvider.TargetFrameTimeVarianceMs](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/targetframetimevariancems.md)'s companion lower-bound check.

## Properties

| Property                                                                                                                                                             | Description                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CpuUtilizationAction](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/cpuutilizationaction.md)           | The action the mode applies in response to the device's CPU utilization data. Always [StateAction.Stale](/engine/7000.0/script-reference/unityengine/adaptiveperformance/stateaction/stale.md) because this mode drives scalers from frame-time variance rather than CPU utilization. |
| [GpuUtilizationAction](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/gpuutilizationaction.md)           | The action the mode applies in response to the device's GPU utilization data. Always [StateAction.Stale](/engine/7000.0/script-reference/unityengine/adaptiveperformance/stateaction/stale.md) because this mode drives scalers from frame-time variance rather than GPU utilization. |
| [Indexer](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/indexer.md)                                     | The Indexer that this mode adjusts scalers through.                                                                                                                                                                                                                                   |
| [ModeName](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/modename.md)                                   | The name of the operation mode.                                                                                                                                                                                                                                                       |
| [PerformanceAction](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/performanceaction.md)                 | The action the mode applies in response to the device's performance state.                                                                                                                                                                                                            |
| [Settings](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/settings.md)                                   | The active Adaptive Performance settings.                                                                                                                                                                                                                                             |
| [TargetFrameTimeVarianceMs](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/targetframetimevariancems.md) | Maximum tolerated variance in the mode's frame-cost signal, in ms².                                                                                                                                                                                                                   |
| [ThermalAction](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/thermalaction.md)                         | The action the mode applies in response to the device's thermal state.                                                                                                                                                                                                                |

## Methods

| Method                                                                                                                                                     | Description                                                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [ApplyModeActions](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/applymodeactions.md)         | Applies stable frame mode's variance, lower-bound, and headroom actions to the active scalers. Adaptive Performance calls this method every frame while stable frame mode is active. |
| [OnOperationModeEnd](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/onoperationmodeend.md)     | Called when stable frame mode is replaced by another operation mode. Resets the variance window and restores the framerate bounds it applied.                                        |
| [OnOperationModeStart](/engine/7000.0/script-reference/unityengine/adaptiveperformance/adaptiveperformancestableframemodeprovider/onoperationmodestart.md) | Called when stable frame mode becomes the active operation mode. Resets the variance window and applies the framerate bounds read from the AdaptiveFramerate scaler.                 |
