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

IEnergyUsageControl

interface in UnityEngine.AdaptivePerformance

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

Use the energy-usage control interface to start, reset, and stop cross-platform per-subsystem energy tracking. While tracking is active, the latest readings are available through PerformanceMetrics.EnergyUsage.

Power-usage tracking reports energy consumed relative to the point at which tracking was started or reset, not an absolute value. Support depends on the active provider and the device (see Feature.EnergyUsage).

Properties

Property Description
EnergyUsageTrackingActive True while energy-usage tracking is active, false otherwise.
EnergyUsageTrackingSupported Returns true if the active provider and device support energy-usage tracking, otherwise returns false.

Public Methods

Method Description
StartEnergyUsageTracking Starts energy-usage tracking, or resets the baseline if tracking is already active so that subsequent PerformanceMetrics.EnergyUsage readings are measured from now.
StopEnergyUsageTracking Stops energy-usage tracking. After calling this method, PerformanceMetrics.EnergyUsage readings remain unavailable until IEnergyUsageControl.StartEnergyUsageTracking is called again.