Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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.
Read time 5 minutesLast updated 10 days ago

Definition

public abstract class AdaptivePerformanceScaler : ScriptableObject

Fields

Value

Description

m_SettingsSettings reference for all scalers.

Properties

Property

Description

CpuImpactScaler impact on CPU so far in milliseconds.
CurrentLevelReturns the current level of scale.
DefaultSettingDefault settings for this scaler.
EnabledReturns
true
if this scaler is active, otherwise returns
false
.
GpuImpactScaler impact on GPU so far in milliseconds.
IsMaxLevelReturns
true
if the scaler can no longer be applied, otherwise returns
false
.
MaxBoundReturns the maximum boundary of this scaler.
MaxLevelReturns the maximum level of this scaler.
MinBoundReturns the minimum boundary of this scaler.
NameReturns a string with the name of the scaler.
NotLeveledReturns
true
if the scaler is not applied, otherwise returns
false
.
OverrideLevelAllows you to manually override the scaler level. If the value is -1, AdaptivePerformanceIndexer will handle levels, otherwise scaler will be forced to the value you specify.
ScaleReturns a generic scale of this scaler in range [0,1] which is applied to the quality.
TargetReturns the bottlenecks that this scaler targets.
VisualImpactReturns the visual impact of scaler when applied.

Methods

Method

Description

ApplyDefaultSettingAny scaler with settings in IAdaptivePerformanceSettings needs to call this method and provide the scaler specific setting. Unity uses the setting arguments in the base-scaler as the default settings. This is also used by Scaler Profiles to apply their Settings.
AwakeEnsures settings are applied during startup.
CalculateCostCalculate the cost of applying this particular scaler.
OnDisabledCallback when scaler gets disabled and removed from indexer
OnEnabledCallback when scaler gets enabled and added to the indexer
OnLevelCallback for any level change
OnLevelDecreaseCallback for when the performance level is decreased.
OnLevelIncreaseCallback for when the performance level is increased.
ScaleChangedChecks if scale changed based on the current level and returns true if scale changed false otherwise.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.