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

IEnergyUsageControl.EnergyUsageTrackingSupported

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

public bool EnergyUsageTrackingSupported;

Description

Returns true if the active provider and device support energy-usage tracking, otherwise returns false.

On some platforms whether the device actually exposes usable energy monitors is resolved asynchronously after IEnergyUsageControl.StartEnergyUsageTracking is called, so this property can start out true and later become false (for example, when the device turns out to have no usable power monitors). Re-check it after starting rather than only once up front, and treat a transition to false as tracking no longer being available.