docs.unity3d.com
    Show / Hide Table of Contents

    Class VolumeParameter

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

    Inheritance
    Object
    VolumeParameter
    VolumeParameter<T>
    Namespace: UnityEngine.Rendering
    Syntax
    public abstract class VolumeParameter

    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

    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
    Boolean
    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.

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

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

    See Also
    m_OverrideState

    Methods

    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.

    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
    Boolean

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

    OnDisable()

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

    Declaration
    protected virtual void OnDisable()

    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.

    Release()

    Override this method to free all allocated resources

    Declaration
    public virtual void Release()

    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.

    Extension Methods

    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)

    See Also

    VolumeParameter<T>
    Back to top
    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