Namespace UnityEngine.AdaptivePerformance
Classes
AdaptiveBatching
A scaler used by AdaptivePerformanceIndexer to control if dynamic batching is enabled.
AdaptiveFramerate
A scaler used by AdaptivePerformanceIndexer to adjust the application update rate using targetFrameRate.
AdaptiveLOD
A scaler used by AdaptivePerformanceIndexer for adjusting at what distance LODs are switched.
AdaptiveLut
A scaler used by AdaptivePerformanceIndexer to adjust the size of the palette used for color grading in URP.
AdaptiveMSAA
A scaler used by AdaptivePerformanceIndexer to adjust the level of antialiasing.
AdaptivePerformanceConfigurationDataAttribute
This 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.
The implementor of the settings is able to create their own custom UI and the Project Settings system will use that UI in place of the build-in one in the Inspector. See the Extending the Editor page in the Unity Manual for more information.
AdaptivePerformanceGeneralSettings
General settings container used to house the instance of the active settings, as well as the manager instance used to load the loaders with.
AdaptivePerformanceIndexer
Higher 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.
AdaptivePerformanceIndexerSettings
Settings of indexer system.
AdaptivePerformanceLoader
Adaptive 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.
AdaptivePerformanceLoaderHelper
Adaptive 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.
AdaptivePerformanceManagerSettings
Class 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.
Given a list of loaders, it will attempt to load each loader in the given order. Unity will use the first loader that is successful and ignore all remaining loaders. The successful loader is accessible through the activeLoader property on the manager.
Depending on configuration, the AdaptivePerformanceGeneralSettings instance will automatically manage the active loader at the correct points in the application lifecycle. You can override certain points in the active loader lifecycle and manually manage them by toggling the automaticLoading and automaticRunning properties. Disabling automaticLoading implies that you are responsible for the full lifecycle of the Adaptive Performance session normally handled by the AdaptivePerformanceGeneralSettings instance. Setting this to false also sets automaticRunning to false.
Disabling automaticRunning only implies that you are responsible for starting and stopping the activeLoader through the StartSubsystems() and StopSubsystems() APIs.
Unity executes atomatic lifecycle management as follows:
- OnEnable calls InitializeLoader() internally. The loader list will be iterated over and the first successful loader will be set as the active loader.
- Start calls StartSubsystems() internally. Ask the active loader to start all subsystems.
- OnDisable calls StopSubsystems() internally. Ask the active loader to stop all subsystems.
- OnDestroy calls DeinitializeLoader() internally. Deinitialize and remove the active loader.
AdaptivePerformanceRenderSettings
This class is used to store changes to a number of rendering quality settings that are applied when using the Universal Render Pipeline.
AdaptivePerformanceScaler
Abstract 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.
AdaptivePerformanceScalerProfile
Scaler profiles are used to combine all settings of scalers into one profile to be able to change the settings of each scaler at once.
AdaptivePerformanceScalerSettings
Settings of indexer system.
AdaptivePerformanceScalerSettingsBase
Settings of indexer system.
AdaptiveResolution
A 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.
AdaptiveShadowCascade
A scaler used by AdaptivePerformanceIndexer to adjust the number of shadow cascades to be used.
AdaptiveShadowDistance
A scaler used by AdaptivePerformanceIndexer to change the distance at which shadows are rendered.
AdaptiveShadowmapResolution
A scaler used by AdaptivePerformanceIndexer to adjust the resolution of shadow maps.
AdaptiveShadowQuality
A scaler used by AdaptivePerformanceIndexer to adjust the quality of shadows.
AdaptiveSorting
A scaler used by AdaptivePerformanceIndexer to change if objects in the scene are sorted by depth before rendering to reduce overdraw.
AdaptiveTransparency
A scaler used by AdaptivePerformanceIndexer to toggle rendering of transparent objects.
AdaptiveViewDistance
A scaler used by AdaptivePerformanceIndexer for adjusting what view distance is applied to the camera.
Constants
Constants used by Adaptive Performance.
Holder
Global access to the default AdaptivePerformance interface.
IAdaptivePerformanceSettings
Provider Settings Interface as base class of the provider. Used to control the Editor runtime asset instance which stores the Settings.
Structs
ClusterInfo
The cluster info describes the CPU Cluster setup.
FrameTiming
FrameTiming stores timing information about CPU, GPU, and the overall frame time.
PerformanceBoostChangeEventArgs
Event arguments for boost changes. These are used in the PerformanceBottleneckChangeHandler.
PerformanceBottleneckChangeEventArgs
Event arguments for performance bottleneck changes. These are used in the PerformanceBottleneckChangeHandler.
PerformanceLevelChangeEventArgs
Arguments for the performance level change event. These are used in the PerformanceLevelChangeHandler.
PerformanceMetrics
PerformanceMetrics store the current bottleneck, CPU, and GPU levels
ThermalMetrics
ThermalMetrics stores the thermal state as TemperatureLevel, TemperatureTrend, and WarningLevel.
Interfaces
IAdaptivePerformance
The 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.
IDevelopmentSettings
Use the developer settings interface to access and change settings which are available only in development mode.
IDevicePerformanceControl
The device performance control interface handles all control elements related to the device performance. You can change the AutomaticPerformanceControl settings or retrieve information about the CpuLevel and GpuLevel.
IPerformanceStatus
You can use the performance status interface to obtain performance metrics, frame timing, and subscribe to bottleneck and performance event changes.
IThermalStatus
Use the thermal status interface to receive thermal status events and thermal metrics of the device.
Enums
PerformanceBottleneck
The performance bottleneck enum describes what is currently limiting the system.
PerformanceControlMode
Enum used to describe the performance control mode used by Adaptive Performance. Can be read from PerformanceControlMode.
ScalerTarget
Bottleneck flags that the scaler targets.
ScalerVisualImpact
Scaler impact on visuals.
StateAction
Describes what action is needed to stabilize.
WarningLevel
Warning levels are used in the ThermalMetrics and describe the thermal status of the device. There are three possible statuses.
Delegates
PerformanceBoostChangeHandler
You can subscribe to the boost event delegate which sends the PerformanceBoostChangeEventArgs when a boost changes.
PerformanceBottleneckChangeHandler
You can subscribe to the bottleneck event delegate which sends the PerformanceBottleneckChangeEventArgs when the bottleneck changes.
PerformanceLevelChangeHandler
You can subscribe to the performance level event delegate which sends the PerformanceLevelChangeEventArgs when the performance level changes.
ThermalEventHandler
You can subscribe to the thermal event delegate which sends the ThermalMetrics when the thermal state changes.