docs.unity3d.com
    Show / Hide Table of Contents

    Class VolumeProfile

    An Asset which holds a set of settings to use with a Volume.

    Inheritance
    Object
    Object
    ScriptableObject
    VolumeProfile
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.Rendering
    Syntax
    [CoreRPHelpURL("Volume-Profile", "com.unity.render-pipelines.high-definition")]
    public sealed class VolumeProfile : ScriptableObject

    Fields

    components

    A list of every setting that this Volume Profile stores.

    Declaration
    public List<VolumeComponent> components
    Field Value
    Type Description
    List<VolumeComponent>

    isDirty

    A dirty check used to redraw the profile inspector when something has changed. This is currently only used in the editor.

    Declaration
    [NonSerialized]
    public bool isDirty
    Field Value
    Type Description
    Boolean

    Methods

    Add(Type, Boolean)

    Adds a VolumeComponent to this Volume Profile.

    Declaration
    public VolumeComponent Add(Type type, bool overrides = false)
    Parameters
    Type Name Description
    Type type

    A type that inherits from VolumeComponent.

    Boolean overrides

    Specifies whether Unity should automatically override all the settings when you add a VolumeComponent to the Volume Profile.

    Returns
    Type Description
    VolumeComponent

    The instance created for the given type that has been added to the profile

    Remarks

    You can only have a single component of the same type per Volume Profile.

    Add<T>(Boolean)

    Adds a VolumeComponent to this Volume Profile.

    Declaration
    public T Add<T>(bool overrides = false)
        where T : VolumeComponent
    Parameters
    Type Name Description
    Boolean overrides

    Specifies whether Unity should automatically override all the settings when you add a VolumeComponent to the Volume Profile.

    Returns
    Type Description
    T

    The instance for the given type that you added to the Volume Profile

    Type Parameters
    Name Description
    T

    A type of VolumeComponent.

    Remarks

    You can only have a single component of the same type per Volume Profile.

    See Also
    Add(Type, Boolean)

    GetHashCode()

    A custom hashing function that Unity uses to compare the state of parameters.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A computed hash code for the current instance.

    Overrides
    Object.GetHashCode()

    Has(Type)

    Checks if this Volume Profile contains the VolumeComponent you pass in.

    Declaration
    public bool Has(Type type)
    Parameters
    Type Name Description
    Type type

    A type that inherits from VolumeComponent.

    Returns
    Type Description
    Boolean

    true if the VolumeComponent exists in the Volume Profile, false otherwise.

    See Also
    Has<T>()
    HasSubclassOf(Type)

    Has<T>()

    Checks if this Volume Profile contains the VolumeComponent you pass in.

    Declaration
    public bool Has<T>()
        where T : VolumeComponent
    Returns
    Type Description
    Boolean

    true if the VolumeComponent exists in the Volume Profile, false otherwise.

    Type Parameters
    Name Description
    T

    A type of VolumeComponent.

    See Also
    Has(Type)
    HasSubclassOf(Type)

    HasSubclassOf(Type)

    Checks if this Volume Profile contains the VolumeComponent, which is a subclass of type, that you pass in.

    Declaration
    public bool HasSubclassOf(Type type)
    Parameters
    Type Name Description
    Type type

    A type that inherits from VolumeComponent.

    Returns
    Type Description
    Boolean

    true if the VolumeComponent exists in the Volume Profile, false otherwise.

    See Also
    Has(Type)
    Has<T>()

    Remove(Type)

    Removes a VolumeComponent from this Volume Profile.

    Declaration
    public void Remove(Type type)
    Parameters
    Type Name Description
    Type type

    A type that inherits from VolumeComponent.

    Remarks

    This method does nothing if the type does not exist in the Volume Profile.

    See Also
    Remove<T>()

    Remove<T>()

    Removes a VolumeComponent from this Volume Profile.

    Declaration
    public void Remove<T>()
        where T : VolumeComponent
    Type Parameters
    Name Description
    T

    A type of VolumeComponent.

    Remarks

    This method does nothing if the type does not exist in the Volume Profile.

    See Also
    Remove(Type)

    Reset()

    Resets the dirty state of the Volume Profile. Unity uses this to force-refresh and redraw the Volume Profile editor when you modify the Asset via script instead of the Inspector.

    Declaration
    public void Reset()

    TryGet<T>(out T)

    Gets the VolumeComponent of the specified type, if it exists.

    Declaration
    public bool TryGet<T>(out T component)
        where T : VolumeComponent
    Parameters
    Type Name Description
    T component

    The output argument that contains the VolumeComponent or null.

    Returns
    Type Description
    Boolean

    true if the VolumeComponent is in the Volume Profile, false otherwise.

    Type Parameters
    Name Description
    T

    A type of VolumeComponent.

    See Also
    TryGet<T>(Type, out T)
    TryGetSubclassOf<T>(Type, out T)
    TryGetAllSubclassOf<T>(Type, List<T>)

    TryGet<T>(Type, out T)

    Gets the VolumeComponent of the specified type, if it exists.

    Declaration
    public bool TryGet<T>(Type type, out T component)
        where T : VolumeComponent
    Parameters
    Type Name Description
    Type type

    A type that inherits from VolumeComponent.

    T component

    The output argument that contains the VolumeComponent or null.

    Returns
    Type Description
    Boolean

    true if the VolumeComponent is in the Volume Profile, false otherwise.

    Type Parameters
    Name Description
    T

    A type of VolumeComponent

    See Also
    TryGet<T>(out T)
    TryGetSubclassOf<T>(Type, out T)
    TryGetAllSubclassOf<T>(Type, List<T>)

    TryGetAllSubclassOf<T>(Type, List<T>)

    Gets all the VolumeComponent that are subclasses of the specified type, if there are any.

    Declaration
    public bool TryGetAllSubclassOf<T>(Type type, List<T> result)
        where T : VolumeComponent
    Parameters
    Type Name Description
    Type type

    A type that inherits from VolumeComponent.

    List<T> result

    The output list that contains all the VolumeComponent if any. Note that Unity does not clear this list.

    Returns
    Type Description
    Boolean

    true if any VolumeComponent have been found in the profile, false otherwise.

    Type Parameters
    Name Description
    T

    A type of VolumeComponent.

    See Also
    TryGet<T>(Type, out T)
    TryGet<T>(out T)
    TryGetSubclassOf<T>(Type, out T)

    TryGetSubclassOf<T>(Type, out T)

    Gets the VolumeComponent, which is a subclass of type, if it exists.

    Declaration
    public bool TryGetSubclassOf<T>(Type type, out T component)
        where T : VolumeComponent
    Parameters
    Type Name Description
    Type type

    A type that inherits from VolumeComponent.

    T component

    The output argument that contains the VolumeComponent or null.

    Returns
    Type Description
    Boolean

    true if the VolumeComponent is in the Volume Profile, false otherwise.

    Type Parameters
    Name Description
    T

    A type of VolumeComponent.

    See Also
    TryGet<T>(Type, out T)
    TryGet<T>(out T)
    TryGetAllSubclassOf<T>(Type, List<T>)

    Extension Methods

    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)
    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