docs.unity3d.com
    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
    UintScalableSetting
    Namespace: UnityEngine.Rendering.HighDefinition
    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

    Item[Int32]

    Get the value for a specific level.

    Declaration
    public T this[int index] { get; }
    Parameters
    Type Name Description
    Int32 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(Int32, out T)

    Get the value of the level index.

    Declaration
    public bool TryGet(int index, out T value)
    Parameters
    Type Name Description
    Int32 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
    Boolean

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

    Explicit Interface Implementations

    ISerializationCallbackReceiver.OnAfterDeserialize()

    Serialization callback

    Declaration
    void ISerializationCallbackReceiver.OnAfterDeserialize()
    Implements
    ISerializationCallbackReceiver.OnAfterDeserialize()

    ISerializationCallbackReceiver.OnBeforeSerialize()

    Serialization callback

    Declaration
    void ISerializationCallbackReceiver.OnBeforeSerialize()
    Implements
    ISerializationCallbackReceiver.OnBeforeSerialize()
    Back to top
    Terms of use
    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