IEnergyUsageControl
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.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Interface
- Namespace: UnityEngine.AdaptivePerformance
- Assembly: UnityEngine.AdaptivePerformanceModule
public interface IEnergyUsageControl
Remarks
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. |
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. |