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
- Type: Class
- Namespace: UnityEngine.AdaptivePerformance
- Assembly: UnityEngine.AdaptivePerformanceModule
- Inherits from: ScriptableObject
public abstract class AdaptivePerformanceScaler : ScriptableObject
Fields
Value | Description |
|---|---|
| m_Settings | Settings reference for all scalers. |
Properties
Property | Description |
|---|---|
| CpuImpact | Scaler impact on CPU so far in milliseconds. |
| CurrentLevel | Returns the current level of scale. |
| DefaultSetting | Default settings for this scaler. |
| Enabled | Returns |
| GpuImpact | Scaler impact on GPU so far in milliseconds. |
| IsMaxLevel | Returns |
| MaxBound | Returns the maximum boundary of this scaler. |
| MaxLevel | Returns the maximum level of this scaler. |
| MinBound | Returns the minimum boundary of this scaler. |
| Name | Returns a string with the name of the scaler. |
| NotLeveled | Returns |
| OverrideLevel | Allows 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. |
| Scale | Returns a generic scale of this scaler in range [0,1] which is applied to the quality. |
| Target | Returns the bottlenecks that this scaler targets. |
| VisualImpact | Returns the visual impact of scaler when applied. |
Methods
Method | Description |
|---|---|
| ApplyDefaultSetting | Any 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. |
| Awake | Ensures settings are applied during startup. |
| CalculateCost | Calculate the cost of applying this particular scaler. |
| OnDisabled | Callback when scaler gets disabled and removed from indexer |
| OnEnabled | Callback when scaler gets enabled and added to the indexer |
| OnLevel | Callback for any level change |
| OnLevelDecrease | Callback for when the performance level is decreased. |
| OnLevelIncrease | Callback for when the performance level is increased. |
| ScaleChanged | Checks if scale changed based on the current level and returns true if scale changed false otherwise. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |