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).
Implements
Inherited Members
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 |
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 |
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.
|
Returns
Type | Description |
---|---|
bool |
|