Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AdaptivePerformanceBatteryModeProvider

The built-in operation mode that prioritizes battery life over performance.
Read time 1 minuteLast updated 12 days ago

Definition

public class AdaptivePerformanceBatteryModeProvider : IAdaptivePerformanceModeProvider

Remarks

Battery mode reduces the target frame rate and enables battery-oriented scalers such as AdaptiveOnDemandRendering, AdaptivePhysics, and AdaptiveFramerate. It also lowers quality further while the player is idle. Refer to AdaptivePerformanceIdleTimeTracker for idle detection. Where the active provider supports it, battery mode requests the device's energy-efficiency mode through IDevicePerformanceLevelControl.SetEnergyEfficiencyMode.

Properties

Property

Description

CpuUtilizationActionThe action the mode applies in response to the device's CPU utilization data.
GpuUtilizationActionThe action the mode applies in response to the device's GPU utilization data.
IdleTimeThresholdInSecondsThe number of seconds the player must be idle before battery mode applies additional idle-based scaling.
IndexerThe Indexer that this mode adjusts scalers through.
ModeNameThe name of the operation mode.
PerformanceActionThe action the mode applies in response to the device's performance state.
SavingTargetThe fraction of frame time that battery mode tries to save once the target frame rate is met, in the range [0, 1].
SettingsThe active Adaptive Performance settings.
ThermalActionThe action the mode applies in response to the device's thermal state.

Methods

Method

Description

ApplyModeActionsApplies battery mode's idle, thermal, and performance actions to the active scalers. Adaptive Performance calls this method every frame while battery mode is active.
OnOperationModeEndCalled when battery mode is replaced by another operation mode. Restores the scalers it enabled and releases the device's energy-efficiency hint.
OnOperationModeStartCalled when battery mode becomes the active operation mode. Prepares the Indexer and enables the battery-oriented scalers.