docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VolumeParameter

    The base class for all parameter types stored in a VolumeComponent.

    This class serves as a base for different parameter types that are used within the Volume system, such as those controlling post-processing effects, lighting settings, and other volume-related parameters.

    The VolumeParameter class implements the ICloneable interface, enabling cloning of the parameter's values for later use or manipulation.

    Inheritance
    object
    VolumeParameter
    VolumeParameter<T>
    Implements
    ICloneable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public abstract class VolumeParameter : ICloneable
    Remarks

    The VolumeParameter class is an abstract base class, and cannot be instantiated directly. Derived classes like VolumeParameter<T> represent specific parameter types, such as float, vector, or color values, and can be used to configure individual settings in a Volume component.

    It is important to note that this class is designed to allow various parameter types to be stored and managed collectively. This mechanism enables developers to create complex and configurable Volume components that can be customized with different parameter types (e.g., sliders for float values, color pickers for color values, etc.).

    Fields

    k_DebuggerDisplay

    A beautified string for debugger output. This is set on a DebuggerDisplay on every parameter types.

    Declaration
    public const string k_DebuggerDisplay = "{m_Value} ({m_OverrideState})"
    Field Value
    Type Description
    string
    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    m_OverrideState

    The current override state for this parameter. The Volume system considers overriden parameters for blending, and ignores non-overriden ones.

    Declaration
    [SerializeField]
    protected bool m_OverrideState
    Field Value
    Type Description
    bool
    See Also
    overrideState

    Properties

    overrideState

    The current override state for this parameter. The Volume system considers overriden parameters for blending, and ignores non-overriden ones. It is also used in the VolumeStack to determine whether a given parameter has been overridden and thus needs to be reset to its default state in the next update.

    Declaration
    public virtual bool overrideState { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    You can override this property to define custom behaviors when the override state changes.

    See Also
    m_OverrideState

    Methods

    Clone()

    Clones the current instance of the VolumeParameter

    Declaration
    public abstract object Clone()
    Returns
    Type Description
    object

    A new created instance with the same values as the current instance of VolumeParameter

    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    GetValue<T>()

    Casts and gets the typed value of this parameter.

    Declaration
    public T GetValue<T>()
    Returns
    Type Description
    T

    A value of type T.

    Type Parameters
    Name Description
    T

    The type of the value stored in this parameter

    Remarks

    This method is unsafe and does not do any type checking.

    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    IsObjectParameter(Type)

    Checks if a given type is an ObjectParameter<T>.

    Declaration
    public static bool IsObjectParameter(Type type)
    Parameters
    Type Name Description
    Type type

    The type to check.

    Returns
    Type Description
    bool

    true if type is an ObjectParameter<T>, false otherwise.

    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    OnDisable()

    Unity calls this method when the parent VolumeComponent goes out of scope.

    Declaration
    protected virtual void OnDisable()
    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    OnEnable()

    Unity calls this method when the parent VolumeComponent loads.

    Declaration
    protected virtual void OnEnable()
    Remarks

    Use this if you need to access fields and properties that you can not access in the constructor of a ScriptableObject. (VolumeParameter are generally declared and initialized in a VolumeComponent, which is a ScriptableObject). Unity calls this right after it constructs the parent VolumeComponent, thus allowing access to previously inaccessible fields and properties.

    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    Release()

    Override this method to free all allocated resources

    Declaration
    public virtual void Release()
    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    SetValue(VolumeParameter)

    Sets the value of this parameter to the value in parameter.

    Declaration
    public abstract void SetValue(VolumeParameter parameter)
    Parameters
    Type Name Description
    VolumeParameter parameter

    The VolumeParameter to copy the value from.

    See Also
    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack

    Implements

    ICloneable

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)

    See Also

    VolumeManager
    VolumeComponent
    VolumeParameter<T>
    ICloneable
    VolumeStack
    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)