docs.unity3d.com
    Show / Hide Table of Contents

    Class SimulatorAdaptivePerformanceSubsystem

    The subsystem is used for simulating Adaptive Performance in the Editor with the Device Simulator. It is also used for Adaptive Performance tests and to simulate Adaptive Performance when it is not available on the hardware you work with.

    Inheritance
    Object
    Subsystem
    Subsystem<AdaptivePerformanceSubsystemDescriptor>
    AdaptivePerformanceSubsystemBase
    AdaptivePerformanceSubsystem
    SimulatorAdaptivePerformanceSubsystem
    Inherited Members
    AdaptivePerformanceSubsystem.Capabilities
    AdaptivePerformanceSubsystem.Stats
    AdaptivePerformanceSubsystemBase.running
    AdaptivePerformanceSubsystemBase.initialized
    Subsystem<AdaptivePerformanceSubsystemDescriptor>.SubsystemDescriptor
    Subsystem.Destroy()
    Namespace: UnityEditor.AdaptivePerformance.Simulator.Editor
    Syntax
    [Preserve]
    public class SimulatorAdaptivePerformanceSubsystem : AdaptivePerformanceSubsystem, ISubsystem, IApplicationLifecycle, IDevicePerformanceLevelControl

    Constructors

    SimulatorAdaptivePerformanceSubsystem()

    Main constructor, not used in the subsystem specifically.

    Declaration
    public SimulatorAdaptivePerformanceSubsystem()

    Properties

    AcceptsPerformanceLevel

    Required to simulate performance changes. To change AutomaticPerformanceControl, you have to set AcceptsPerformanceLevel to true. See PerformanceLevelControlAvailable.

    Declaration
    public bool AcceptsPerformanceLevel { get; set; }
    Property Value
    Type Description
    Boolean

    ApplicationLifecycle

    See ApplicationLifecycle.

    Declaration
    public override IApplicationLifecycle ApplicationLifecycle { get; }
    Property Value
    Type Description
    IApplicationLifecycle
    Overrides
    AdaptivePerformanceSubsystem.ApplicationLifecycle

    ChangeFlags

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see ChangeFlags.

    Declaration
    public Feature ChangeFlags { get; set; }
    Property Value
    Type Description
    Feature

    CpuPerformanceBoost

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see CpuPerformanceBoost.

    Declaration
    public bool CpuPerformanceBoost { get; set; }
    Property Value
    Type Description
    Boolean

    CpuPerformanceLevel

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see CpuPerformanceLevel.

    Declaration
    public int CpuPerformanceLevel { get; set; }
    Property Value
    Type Description
    Int32

    GpuPerformanceBoost

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see GpuPerformanceBoost.

    Declaration
    public bool GpuPerformanceBoost { get; set; }
    Property Value
    Type Description
    Boolean

    GpuPerformanceLevel

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see GpuPerformanceLevel.

    Declaration
    public int GpuPerformanceLevel { get; set; }
    Property Value
    Type Description
    Int32

    MaxCpuPerformanceLevel

    See MaxCpuPerformanceLevel.

    Declaration
    public int MaxCpuPerformanceLevel { get; }
    Property Value
    Type Description
    Int32
    Implements
    IDevicePerformanceLevelControl.MaxCpuPerformanceLevel

    MaxGpuPerformanceLevel

    See MaxGpuPerformanceLevel.

    Declaration
    public int MaxGpuPerformanceLevel { get; }
    Property Value
    Type Description
    Int32
    Implements
    IDevicePerformanceLevelControl.MaxGpuPerformanceLevel

    NextCpuFrameTime

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see CpuFrameTime.

    Declaration
    public float NextCpuFrameTime { get; set; }
    Property Value
    Type Description
    Single

    NextGpuFrameTime

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see GpuFrameTime.

    Declaration
    public float NextGpuFrameTime { get; set; }
    Property Value
    Type Description
    Single

    NextOverallFrameTime

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see OverallFrameTime.

    Declaration
    public float NextOverallFrameTime { get; set; }
    Property Value
    Type Description
    Single

    PerformanceLevelControl

    See PerformanceLevelControl.

    Declaration
    public override IDevicePerformanceLevelControl PerformanceLevelControl { get; }
    Property Value
    Type Description
    IDevicePerformanceLevelControl
    Overrides
    AdaptivePerformanceSubsystem.PerformanceLevelControl

    TemperatureLevel

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see TemperatureLevel.

    Declaration
    public float TemperatureLevel { get; set; }
    Property Value
    Type Description
    Single

    TemperatureTrend

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see TemperatureTrend.

    Declaration
    public float TemperatureTrend { get; set; }
    Property Value
    Type Description
    Single

    Version

    The current version of the Device Simulator Adaptive Performance Subsystem. Matches the version of the Adaptive Performance Subsystem. See Version.

    Declaration
    public override Version Version { get; }
    Property Value
    Type Description
    Version
    Overrides
    AdaptivePerformanceSubsystem.Version

    WarningLevel

    This property is a wrapper around an internal PerformanceDataRecord object. For more details, see WarningLevel.

    Declaration
    public WarningLevel WarningLevel { get; set; }
    Property Value
    Type Description
    WarningLevel

    Methods

    ApplicationPause()

    Callback that is called when the application goes into a pause state.

    Declaration
    public void ApplicationPause()
    Implements
    IApplicationLifecycle.ApplicationPause()

    ApplicationResume()

    Callback that is called when the application resumes after being paused.

    Declaration
    public void ApplicationResume()
    Implements
    IApplicationLifecycle.ApplicationResume()

    EnableCpuBoost()

    Enable the boost mode for the CPU.

    Declaration
    public bool EnableCpuBoost()
    Returns
    Type Description
    Boolean

    Returns if CPU boost mode was successfully enabled.

    Implements
    IDevicePerformanceLevelControl.EnableCpuBoost()

    EnableGpuBoost()

    Enable the boost mode for the GPU.

    Declaration
    public bool EnableGpuBoost()
    Returns
    Type Description
    Boolean

    Returns if GPU boost mode was successfully enabled.

    Implements
    IDevicePerformanceLevelControl.EnableGpuBoost()

    OnDestroy()

    Cleanup when the subsystem object is destroyed.

    Declaration
    protected override void OnDestroy()
    Overrides
    Subsystem.OnDestroy()

    SetClusterInfo(ClusterInfo)

    Helper for the device simulator to change cluster info settings. Those settings are usually changed by a device directly.

    Declaration
    public void SetClusterInfo(ClusterInfo clusterInfo)
    Parameters
    Type Name Description
    ClusterInfo clusterInfo

    New Cluster Info values.

    SetPerformanceLevel(ref Int32, ref Int32)

    Set the performance level for both the CPU and GPU.

    Declaration
    public bool SetPerformanceLevel(ref int cpuLevel, ref int gpuLevel)
    Parameters
    Type Name Description
    Int32 cpuLevel

    The CPU performance level to request.

    Int32 gpuLevel

    The GPU performance level to request.

    Returns
    Type Description
    Boolean

    Returns if the levels were successfully set.

    Implements
    IDevicePerformanceLevelControl.SetPerformanceLevel(ref Int32, ref Int32)

    Start()

    Perform initialization of the subsystem.

    Declaration
    public override void Start()
    Overrides
    Subsystem.Start()

    Stop()

    Stop running the subsystem.

    Declaration
    public override void Stop()
    Overrides
    Subsystem.Stop()

    Update()

    Update current results and flags.

    Declaration
    public override PerformanceDataRecord Update()
    Returns
    Type Description
    PerformanceDataRecord

    The latest PerformanceDataRecord object.

    Overrides
    AdaptivePerformanceSubsystem.Update()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023