Interface IDevicePerformanceLevelControl
The device performance level control lets you change CPU and GPU levels and informs you about the current levels.
Namespace: UnityEngine.AdaptivePerformance.Provider
Syntax
public interface IDevicePerformanceLevelControl
Properties
MaxCpuPerformanceLevel
Maximum supported CPU performance level, it should not change after startup. UnknownPerformanceLevel in case performance levels are not supported. Value in the range of [MinCpuPerformanceLevel, 10].
Declaration
int MaxCpuPerformanceLevel { get; }
Property Value
Type | Description |
---|---|
Int32 | Value in the range of [MinCpuPerformanceLevel, 10] |
MaxGpuPerformanceLevel
Maximum supported GPU performance level, it should not change after startup. UnknownPerformanceLevel in case performance levels are not supported. Value in the range of [MinGpuPerformanceLevel, 10].
Declaration
int MaxGpuPerformanceLevel { get; }
Property Value
Type | Description |
---|---|
Int32 | Value in the range of [MinGpuPerformanceLevel, 10] |
Methods
SetPerformanceLevel(Int32, Int32)
Request a performance level change. If UnknownPerformanceLevel is passed the subsystem picks the level to be used.
Declaration
bool SetPerformanceLevel(int cpu, int gpu)
Parameters
Type | Name | Description |
---|---|---|
Int32 | cpu | The new performance level. May be UnknownPerformanceLevel or range of [MinCpuPerformanceLevel, MaxCpuPerformanceLevel]. If CpuPerformanceLevel is not supported (see Capabilities) this parameter is ignored. |
Int32 | gpu | The new performance level. May be UnknownPerformanceLevel or range of [MinCpuPerformanceLevel, MaxGpuPerformanceLevel]. If GpuPerformanceLevel is not supported (see Capabilities) this parameter is ignored. |
Returns
Type | Description |
---|---|
Boolean |
|