Documentation

Unity Engine

Download Unity

Unity Engine

UnityEngine.AdaptivePerformanceModule

Adaptive Performance is a built-in module that allows users to adjust settings based on performance metrics.
Read time 7 minutesLast updated 3 hours ago

Definition

  • Type: Module

Classes

Class

Description

AdaptiveDecalsA scaler used by AdaptivePerformanceIndexer to adjust the view distance of decals.
AdaptiveFramerateA scaler used by AdaptivePerformanceIndexer to adjust the application update rate using Application.targetFrameRate.
AdaptiveLayerCullingA scaler used by AdaptivePerformanceIndexer for adjusting layer culling distances.
AdaptiveLODA scaler used by AdaptivePerformanceIndexer for adjusting at what distance LODs are switched.
AdaptiveLutA scaler used by AdaptivePerformanceIndexer to adjust the size of the palette used for color grading in URP.
AdaptiveMSAAA scaler used by AdaptivePerformanceIndexer to adjust the level of antialiasing.
AdaptiveOnDemandRenderingA scaler used by AdaptivePerformanceIndexer to render frames less frequently by increasing the on-demand rendering frame interval.
AdaptivePerformanceBatteryModeProviderThe built-in operation mode that prioritizes battery life over performance.
AdaptivePerformanceConfigurationDataAttributeThis attribute is used to tag classes as providing build settings support for an Adaptive Performance provider. The unified setting system will present the settings as an inspectable object in the Project Settings window using the built-in inspector UI.
AdaptivePerformanceEnergyUsageExtensionsExtension methods for IAdaptivePerformance related to energy-usage tracking.
AdaptivePerformanceGeneralSettingsA
ScriptableObject
that contains global settings applicable to all Adaptive Performance providers.
AdaptivePerformanceIdleTimeTrackerTracks how long the player has been idle so battery mode can reduce quality further during inactivity.
AdaptivePerformanceIndexerHigher level implementation of Adaptive performance that tracks performance and thermal states of the device and provides them to AdaptivePerformanceScaler which use the information to increase or decrease performance levels. System acts as AdaptivePerformanceScaler manager and handles the lifetime of the scalers in the scenes.
AdaptivePerformanceIndexerSettingsSettings of indexer system.
AdaptivePerformanceLoaderAdaptive Performance Loader abstract class used as a base class for specific provider implementations. Providers should implement subclasses of this to provide specific initialization and management implementations that make sense for their supported scenarios and needs.
AdaptivePerformanceLoaderHelperAdaptive Performance Loader abstract subclass used as a base class for specific provider implementations. Class provides some helper logic that can be used to handle subsystem handling in a typesafe manner, reducing potential boilerplate code.
AdaptivePerformanceManagerSettingsClass to handle active loader and subsystem management for Adaptive Performance. This class is to be added as a ScriptableObject asset in your project and should only be referenced by an AdaptivePerformanceGeneralSettings instance for its use.
AdaptivePerformanceNormalModeProviderThe default operation mode that prioritizes the highest achievable frame rate.
AdaptivePerformanceProfilerStatsProfiler Stats reporting helper class. Stores all adaptive performance markers and helper functions.
AdaptivePerformanceRenderSettingsThis class is used to store changes to a number of rendering quality settings that are applied when using the Universal Render Pipeline.
AdaptivePerformanceScalerAbstract class representing single feature that is controlled by AdaptivePerformanceIndexer. You control the quality through changing the levels, where 0 represents the controller not being applied and 1,2... as applied. As a result, a higher level represents lower visuals, but better performance.
AdaptivePerformanceScalerProfileScaler profiles are used to combine all settings of scalers into one profile to be able to change the settings of each scaler at once.
AdaptivePerformanceScalerSettingsSettings of indexer system.
AdaptivePerformanceScalerSettingsBaseSettings of indexer system.
AdaptivePerformanceStableFrameModeProviderMode provider that prioritizes consistent frame time over the highest achievable frame rate.
AdaptivePerformanceSubsystemA class to define a provider subsystem for Adaptive Performance.
AdaptivePerformanceSubsystemBase<TSubsystem, TSubsystemDescriptor, TProvider>Base class for subsystems to create your custom provider subsystem to deliver data from your provider to Adaptive Performance.
AdaptivePerformanceSubsystemDescriptorThe Adaptive Performance Subsystem Descriptor is used for describing the subsystem so it can be picked up by the subsystem management system.
AdaptivePhysicsA scaler used by AdaptivePerformanceIndexer for adjusting how physics is applied.
AdaptiveResolutionA scaler used by AdaptivePerformanceIndexer to adjust the resolution of all render targets that allow dynamic resolution. If a device or graphics API doesn't support a dynamic resolution, it will use the rendering pipeline's render scale multiplier as a fallback.
AdaptiveShadowCascadeA scaler used by AdaptivePerformanceIndexer to adjust the number of shadow cascades to be used.
AdaptiveShadowDistanceA scaler used by AdaptivePerformanceIndexer to change the distance at which shadows are rendered.
AdaptiveShadowmapResolutionA scaler used by AdaptivePerformanceIndexer to adjust the resolution of shadow maps.
AdaptiveShadowQualityA scaler used by AdaptivePerformanceIndexer to adjust the quality of shadows.
AdaptiveSortingA scaler used by AdaptivePerformanceIndexer to change if objects in the scene are sorted by depth before rendering to reduce overdraw.
AdaptiveTransparencyA scaler used by AdaptivePerformanceIndexer to toggle rendering of transparent objects.
AdaptiveViewDistanceA scaler used by AdaptivePerformanceIndexer for adjusting what view distance is applied to the camera.
BasicProviderConstantsStatic class that stores the setting key for basic provider.
BasicProviderSettingsBasic provider Settings.
ConstantsConstants used by Adaptive Performance.
HolderGlobal access to the default Adaptive Performance interface and lifecycle management controls.
IAdaptivePerformanceSettingsProvider Settings Interface as base class of the provider. Used to control the Editor runtime asset instance which stores the Settings.

Structs

Struct

Description

ClusterInfoThe cluster info describes the CPU Cluster setup.
EnergyUsageA collection of cross-platform per-subsystem energy consumption readings, surfaced through PerformanceMetrics.EnergyUsage.
EnergyUsageReadingThe energy consumed by a single device subsystem since energy-usage tracking was started or reset, together with the time interval over which it was measured.
FrameTimingFrameTiming stores timing information about CPU, GPU, and the overall frame time.
PerformanceBoostChangeEventArgsEvent arguments for boost changes. These are used in the PerformanceBottleneckChangeHandler.
PerformanceBottleneckChangeEventArgsEvent arguments for performance bottleneck changes. These are used in the PerformanceBottleneckChangeHandler.
PerformanceDataRecordThe performance data record stores all information about the thermal and performance status and delivers it from the provider subsystem to Adaptive Performance for further processing.
PerformanceLevelChangeEventArgsArguments for the performance level change event. These are used in the PerformanceLevelChangeHandler.
PerformanceMetricsPerformanceMetrics store the current bottleneck, CPU, and GPU levels
ThermalMetricsThermalMetrics stores the thermal state as ThermalMetrics.TemperatureLevel, ThermalMetrics.TemperatureTrend, and ThermalMetrics.WarningLevel.

Enums

Enum

Description

EnergyUsageSubsystemIdentifies a device hardware subsystem that can report energy consumption through EnergyUsage.
FeatureFeature flags See PerformanceDataRecord.ChangeFlags and AdaptivePerformanceSubsystem.Capabilities.
LifecycleChangeTypeTypes of Adaptive Performance lifecycle changes.
OperationModeThe operation mode that Adaptive Performance uses to prioritize how it adjusts application quality.
PerformanceBottleneckThe performance bottleneck enum describes what is currently limiting the system.
PerformanceControlModeEnum used to describe the performance control mode used by Adaptive Performance. Can be read from IDevicePerformanceControl.PerformanceControlMode.
PerformanceModeThe performance mode enum describes what is currently the active performance mode of the stystem.
ScalerTargetBottleneck flags that the scaler targets.
ScalerVisualImpactScaler impact on visuals.
StateActionDescribes what action is needed to stabilize.
WarningLevelWarning levels are used in the ThermalMetrics and describe the thermal status of the device. There are three possible statuses.

Interfaces

Interface

Description

IAdaptivePerformanceThe main interface to access Adaptive Performance. None of the properties in this interface change after startup. This means the references returned by the properties may be cached by the user.
IAdaptivePerformanceModeProviderRepresents an operation mode that applies thermal and performance actions to Adaptive Performance scalers.
IApplicationLifecycleThis interface describes how the Adaptive Performance provider lifecycle behaves.
IDevelopmentSettingsUse the developer settings interface to access and change settings which are available only in development mode.
IDevicePerformanceControlThe device performance control interface handles all control elements related to the device performance. You can change the IDevicePerformanceControl.AutomaticPerformanceControl settings or retrieve information about the IDevicePerformanceControl.CpuLevel and IDevicePerformanceControl.GpuLevel.
IDevicePerformanceLevelControlThe device performance level control lets you change CPU and GPU levels and informs you about the current levels.
IEnergyUsageControlUse 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.
IEnergyUsageProviderOptional provider interface for per-subsystem energy tracking. A provider implements this interface when it can report Feature.EnergyUsage. Adaptive Performance discovers the implementation through AdaptivePerformanceSubsystem.EnergyUsageControl and surfaces it to users as IEnergyUsageControl.
IOperationModeStatusProvides access to the active operation mode provider.
IPerformanceModeStatusUse the performance mode status interface to receive performance mode status events of the device.
IPerformanceStatusYou can use the performance status interface to obtain performance metrics, frame timing, and subscribe to bottleneck and performance event changes.
IThermalStatusUse the thermal status interface to receive thermal status events and thermal metrics of the device.

Delegates

Delegate

Description

LifecycleEventHandlerAdaptive Performance lifecycle events which are sent when the lifecycle of IAdaptivePerformance is changed.
PerformanceBoostChangeHandlerYou can subscribe to the boost event delegate which sends the PerformanceBoostChangeEventArgs when a boost changes.
PerformanceBottleneckChangeHandlerYou can subscribe to the bottleneck event delegate which sends the PerformanceBottleneckChangeEventArgs when the bottleneck changes.
PerformanceLevelChangeHandlerYou can subscribe to the performance level event delegate which sends the PerformanceLevelChangeEventArgs when the performance level changes.
PerformanceModeEventHandlerYou can subscribe to the performance mode event delegate which sends the PerformanceMode when the performance mode changes.
ThermalEventHandlerYou can subscribe to the thermal event delegate which sends the ThermalMetrics when the thermal state changes.