docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ParameterOverride<T>

    The base typed class for all parameter override types.

    Inheritance
    object
    ParameterOverride
    ParameterOverride<T>
    AmbientOcclusionModeParameter
    AmbientOcclusionQualityParameter
    BoolParameter
    ColorParameter
    EyeAdaptationParameter
    FloatParameter
    GradingModeParameter
    IntParameter
    KernelSizeParameter
    ScreenSpaceReflectionPresetParameter
    ScreenSpaceReflectionResolutionParameter
    SplineParameter
    TextureParameter
    TonemapperParameter
    Vector2Parameter
    Vector3Parameter
    Vector4Parameter
    VignetteModeParameter
    Inherited Members
    ParameterOverride.overrideState
    ParameterOverride.GetValue<T>()
    ParameterOverride.OnEnable()
    ParameterOverride.OnDisable()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.PostProcessing
    Assembly: Unity.Postprocessing.Runtime.dll
    Syntax
    [Serializable]
    public class ParameterOverride<T> : ParameterOverride
    Type Parameters
    Name Description
    T

    The type of value to store in this ParameterOverride

    Remarks

    Due to limitations with the serialization system in Unity you shouldn't use this class directly. Use one of the pre-flatten types (like FloatParameter or make your own by extending this class.

    Examples

    This sample code shows how to make a custom parameter holding a float.

    [Serializable]
    public sealed class FloatParameter : ParameterOverride<float>
    {
        public override void Interp(float from, float to, float t)
        {
            value = from + (to - from) * t;
        }
    }

    Constructors

    ParameterOverride()

    Creates a ParameterOverride with a default value and overrideState set to false.

    Declaration
    public ParameterOverride()

    ParameterOverride(T)

    Creates a ParameterOverride with a given value and overrideState set to false.

    Declaration
    public ParameterOverride(T value)
    Parameters
    Type Name Description
    T value

    The value to set this parameter to

    ParameterOverride(T, bool)

    Creates a ParameterOverride with a given value and override state.

    Declaration
    public ParameterOverride(T value, bool overrideState)
    Parameters
    Type Name Description
    T value

    The value to set this parameter to

    bool overrideState

    The override state for this value

    Fields

    value

    The value stored in this parameter.

    Declaration
    public T value
    Field Value
    Type Description
    T

    Methods

    GetHash()

    Returns the computed hash code for this parameter.

    Declaration
    public override int GetHash()
    Returns
    Type Description
    int

    A computed hash code

    Overrides
    ParameterOverride.GetHash()

    Interp(T, T, float)

    Interpolates between two values given an interpolation factor t.

    Declaration
    public virtual void Interp(T from, T to, float t)
    Parameters
    Type Name Description
    T from

    The value to interpolate from

    T to

    The value to interpolate to

    float t

    An interpolation factor (generally in range [0,1])

    Remarks

    By default this method does a "snap" interpolation, meaning it will return the value to if t is higher than 0, from otherwise.

    Override(T)

    Sets the value for this parameter to x and mark the override state to true.

    Declaration
    public void Override(T x)
    Parameters
    Type Name Description
    T x

    Operators

    implicit operator T(ParameterOverride<T>)

    Implicit conversion between ParameterOverride<T> and its value type.

    Declaration
    public static implicit operator T(ParameterOverride<T> prop)
    Parameters
    Type Name Description
    ParameterOverride<T> prop

    The parameter to implicitly cast

    Returns
    Type Description
    T

    A value of type .

    In This Article
    Back to top
    Copyright © 2025 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)