docs.unity3d.com
    Show / Hide Table of Contents

    Class 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.

    Inheritance
    Object
    UnityEngine.Object
    UnityEngine.ScriptableObject
    AdaptivePerformanceScaler
    AdaptiveBatching
    AdaptiveDecals
    AdaptiveFramerate
    AdaptiveLayerCulling
    AdaptiveLOD
    AdaptiveLut
    AdaptiveMSAA
    AdaptivePhysics
    AdaptiveResolution
    AdaptiveShadowCascade
    AdaptiveShadowDistance
    AdaptiveShadowmapResolution
    AdaptiveShadowQuality
    AdaptiveSorting
    AdaptiveTransparency
    AdaptiveViewDistance
    Inherited Members
    UnityEngine.ScriptableObject.SetDirty()
    UnityEngine.ScriptableObject.CreateInstance(System.String)
    UnityEngine.ScriptableObject.CreateInstance(System.Type)
    UnityEngine.ScriptableObject.CreateInstance<T>()
    UnityEngine.Object.GetInstanceID()
    UnityEngine.Object.GetHashCode()
    UnityEngine.Object.Equals(System.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Instantiate<T>(T)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
    UnityEngine.Object.Destroy(UnityEngine.Object)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
    UnityEngine.Object.FindObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfType(System.Type, System.Boolean)
    UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
    UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
    UnityEngine.Object.DestroyObject(UnityEngine.Object)
    UnityEngine.Object.FindSceneObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
    UnityEngine.Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
    UnityEngine.Object.FindObjectOfType(System.Type)
    UnityEngine.Object.FindObjectOfType(System.Type, System.Boolean)
    UnityEngine.Object.ToString()
    UnityEngine.Object.name
    UnityEngine.Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.AdaptivePerformance
    Syntax
    public abstract class AdaptivePerformanceScaler : ScriptableObject

    Fields

    m_Settings

    Settings reference for all scalers.

    Declaration
    protected IAdaptivePerformanceSettings m_Settings
    Field Value
    Type Description
    IAdaptivePerformanceSettings

    Properties

    CpuImpact

    Scaler impact on CPU so far in milliseconds.

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

    CurrentLevel

    Returns the current level of scale.

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

    Enabled

    Returns true if this scaler is active, otherwise returns false.

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

    GpuImpact

    Scaler impact on GPU so far in milliseconds.

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

    IsMaxLevel

    Returns true if the scaler can no longer be applied, otherwise returns false.

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

    MaxBound

    Returns the maximum boundary of this scaler.

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

    MaxLevel

    Returns the maximum level of this scaler.

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

    MinBound

    Returns the minimum boundary of this scaler.

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

    Name

    Returns a string with the name of the scaler.

    Declaration
    public virtual string Name { get; set; }
    Property Value
    Type Description
    String

    NotLeveled

    Returns true if the scaler is not applied, otherwise returns false.

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

    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.

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

    Scale

    Returns a generic scale of this scaler in range [0,1] which is applied to the quality.

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

    Target

    Returns the bottlenecks that this scaler targets.

    Declaration
    public virtual ScalerTarget Target { get; set; }
    Property Value
    Type Description
    ScalerTarget

    VisualImpact

    Returns the visual impact of scaler when applied.

    Declaration
    public virtual ScalerVisualImpact VisualImpact { get; set; }
    Property Value
    Type Description
    ScalerVisualImpact

    Methods

    ApplyDefaultSetting(AdaptivePerformanceScalerSettingsBase)

    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.

    Declaration
    public void ApplyDefaultSetting(AdaptivePerformanceScalerSettingsBase defaultSetting)
    Parameters
    Type Name Description
    AdaptivePerformanceScalerSettingsBase defaultSetting

    The settings to apply to the scaler.

    Awake()

    Ensures settings are applied during startup.

    Declaration
    protected virtual void Awake()

    CalculateCost()

    Calculate the cost of applying this particular scaler.

    Declaration
    public int CalculateCost()
    Returns
    Type Description
    Int32

    Cost of scaler ranges from 0 to infinity.

    OnDisabled()

    Callback when scaler gets disabled and removed from indexer

    Declaration
    protected virtual void OnDisabled()

    OnEnabled()

    Callback when scaler gets enabled and added to the indexer

    Declaration
    protected virtual void OnEnabled()

    OnLevel()

    Callback for any level change

    Declaration
    protected virtual void OnLevel()

    OnLevelDecrease()

    Callback for when the performance level is decreased.

    Declaration
    protected virtual void OnLevelDecrease()

    OnLevelIncrease()

    Callback for when the performance level is increased.

    Declaration
    protected virtual void OnLevelIncrease()

    ScaleChanged()

    Checks if scale changed based on the current level and returns true if scale changed false otherwise.

    Declaration
    protected bool ScaleChanged()
    Returns
    Type Description
    Boolean

    Returns true if scale changed false otherwise.

    Back to top
    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