docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    Assembly: Unity.AdaptivePerformance.dll
    Syntax
    public interface IDevicePerformanceLevelControl

    Properties

    MaxCpuPerformanceLevel

    Maximum supported CPU performance level. This 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
    int

    Value in the range of [MinCpuPerformanceLevel, 10]

    MaxGpuPerformanceLevel

    Maximum supported GPU performance level. This 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
    int

    Value in the range of [MinGpuPerformanceLevel, 10]

    Methods

    EnableCpuBoost()

    Request a CPU performance boost. If CpuPerformanceBoost is not supported (see Capabilities), this function is ignored.

    Declaration
    bool EnableCpuBoost()
    Returns
    Type Description
    bool

    Returns true on success. When this fails, it means that the system took control and does not allow boosts.

    EnableGpuBoost()

    Request a GPU performance boost. If GpuPerformanceBoost is not supported (see Capabilities), this function is ignored.

    Declaration
    bool EnableGpuBoost()
    Returns
    Type Description
    bool

    Returns true on success. When this fails, it means that the system took control and does not allow boosts.

    SetPerformanceLevel(ref int, ref int)

    Request a performance level change. If UnknownPerformanceLevel is passed, the subsystem picks the level to be used.

    Declaration
    bool SetPerformanceLevel(ref int cpu, ref int gpu)
    Parameters
    Type Name Description
    int cpu

    The new performance level. Can be UnknownPerformanceLevel or range of [MinCpuPerformanceLevel, MaxCpuPerformanceLevel]. If CpuPerformanceLevel is not supported (see Capabilities), this parameter is ignored.

    int gpu

    The new performance level. Can be UnknownPerformanceLevel or range of [MinCpuPerformanceLevel, MaxGpuPerformanceLevel]. If GpuPerformanceLevel is not supported (see Capabilities), this parameter is ignored.

    Returns
    Type Description
    bool

    Returns true on success. When this fails, it means that the system took control of the active performance levels.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)