Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

AdaptivePerformanceBatteryModeProvider

class in UnityEngine.AdaptivePerformance


Implements interfaces:IAdaptivePerformanceModeProvider

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The built-in operation mode that prioritizes battery life over performance.

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
CpuUtilizationAction The action the mode applies in response to the device's CPU utilization data.
GpuUtilizationAction The action the mode applies in response to the device's GPU utilization data.
IdleTimeThresholdInSeconds The number of seconds the player must be idle before battery mode applies additional idle-based scaling.
Indexer The Indexer that this mode adjusts scalers through.
ModeName The name of the operation mode.
PerformanceAction The action the mode applies in response to the device's performance state.
SavingTarget The fraction of frame time that battery mode tries to save once the target frame rate is met, in the range [0, 1].
Settings The active Adaptive Performance settings.
ThermalAction The action the mode applies in response to the device's thermal state.

Public Methods

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