docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ScalableSetting<T>

    Define the level's value for a ScalableSettingValue<T>.

    Use this setting in an asset that defines the quality settings for a specific platform. Then those settings can be used with the ScalableSettingValue<T> to get the actual value to use.

    If you intend to serialize this type, use specialized version instead. (IntScalableSetting).

    Inheritance
    object
    ScalableSetting<T>
    BoolScalableSetting
    FloatScalableSetting
    IntScalableSetting
    RenderPipelineSettings.PlanarReflectionAtlasResolutionScalableSetting
    RenderPipelineSettings.ReflectionProbeResolutionScalableSetting
    UintScalableSetting
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    [Serializable]
    public class ScalableSetting<T> : ISerializationCallbackReceiver
    Type Parameters
    Name Description
    T

    The type of the scalable setting.

    Constructors

    ScalableSetting(T[], ScalableSettingSchemaId)

    Build a new scalable setting.

    Declaration
    public ScalableSetting(T[] values, ScalableSettingSchemaId schemaId)
    Parameters
    Type Name Description
    T[] values

    The values of the scalable setting. Must not be null.

    ScalableSettingSchemaId schemaId

    The of the schema for this scalable setting.

    Properties

    this[int]

    Get the value for a specific level.

    Declaration
    public T this[int index] { get; }
    Parameters
    Type Name Description
    int index

    The index of the value to get.

    Property Value
    Type Description
    T

    If the index is in the range of the contained values, the associated value will be returned. Otherwise, default is returned.

    schemaId

    The schema id of this scalable setting.

    Declaration
    public ScalableSettingSchemaId schemaId { get; set; }
    Property Value
    Type Description
    ScalableSettingSchemaId

    Methods

    TryGet(int, out T)

    Get the value of the level index.

    Declaration
    public bool TryGet(int index, out T value)
    Parameters
    Type Name Description
    int index

    The index of the level to get.

    T value

    Contains the value of the level when the level is found.

    default when:

    • The index is out of range
    Returns
    Type Description
    bool

    true when the value was evaluated, false when the value could not be evaluated.

    Implements

    ISerializationCallbackReceiver
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)