Class VolumeManager | Core RP Library | 8.1.0
docs.unity3d.com
    Show / Hide Table of Contents

    Class VolumeManager

    A global manager that tracks all the Volumes in the currently loaded Scenes and does all the interpolation work.

    Inheritance
    Object
    VolumeManager
    Namespace: UnityEngine.Rendering
    Syntax
    public sealed class VolumeManager

    Properties

    baseComponentTypes

    The current list of all available types that derive from VolumeComponent.

    Declaration
    public IEnumerable<Type> baseComponentTypes { get; }
    Property Value
    Type Description
    IEnumerable<Type>

    instance

    The current singleton instance of VolumeManager.

    Declaration
    public static VolumeManager instance { get; }
    Property Value
    Type Description
    VolumeManager

    stack

    A reference to the main VolumeStack.

    Declaration
    public VolumeStack stack { get; }
    Property Value
    Type Description
    VolumeStack
    See Also
    VolumeStack

    Methods

    CheckBaseTypes()

    Checks the state of the base type library. This is only used in the editor to handle entering and exiting of play mode and domain reload.

    Declaration
    [Conditional("UNITY_EDITOR")]
    public void CheckBaseTypes()

    CheckStack(VolumeStack)

    Checks the state of a given stack. This is only used in the editor to handle entering and exiting of play mode and domain reload.

    Declaration
    [Conditional("UNITY_EDITOR")]
    public void CheckStack(VolumeStack stack)
    Parameters
    Type Name Description
    VolumeStack stack

    The stack to check.

    CreateStack()

    Creates and returns a new VolumeStack to use when you need to store the result of the Volume blending pass in a separate stack.

    Declaration
    public VolumeStack CreateStack()
    Returns
    Type Description
    VolumeStack
    See Also
    VolumeStack
    Update(VolumeStack, Transform, LayerMask)

    DestroyStack(VolumeStack)

    Destroy a Volume Stack

    Declaration
    public void DestroyStack(VolumeStack stack)
    Parameters
    Type Name Description
    VolumeStack stack

    Volume Stack that needs to be destroyed.

    IsComponentActiveInMask<T>(LayerMask)

    Checks if a VolumeComponent is active in a given LayerMask.

    Declaration
    public bool IsComponentActiveInMask<T>(LayerMask layerMask)
        where T : VolumeComponent
    Parameters
    Type Name Description
    LayerMask layerMask

    The LayerMask to check against

    Returns
    Type Description
    Boolean

    true if the component is active in the LayerMask, false otherwise.

    Type Parameters
    Name Description
    T

    A type derived from VolumeComponent

    Register(Volume, Int32)

    Registers a new Volume in the manager. Unity does this automatically when a new Volume is enabled, or its layer changes, but you can use this function to force-register a Volume that is currently disabled.

    Declaration
    public void Register(Volume volume, int layer)
    Parameters
    Type Name Description
    Volume volume

    The volume to register.

    Int32 layer

    The LayerMask that this volume is in.

    See Also
    Unregister(Volume, Int32)

    Unregister(Volume, Int32)

    Unregisters a Volume from the manager. Unity does this automatically when a Volume is disabled or goes out of scope, but you can use this function to force-unregister a Volume that you added manually while it was disabled.

    Declaration
    public void Unregister(Volume volume, int layer)
    Parameters
    Type Name Description
    Volume volume

    The Volume to unregister.

    Int32 layer

    The LayerMask that this Volume is in.

    See Also
    Register(Volume, Int32)

    Update(Transform, LayerMask)

    Updates the global state of the Volume manager. Unity usually calls this once per Camera in the Update loop before rendering happens.

    Declaration
    public void Update(Transform trigger, LayerMask layerMask)
    Parameters
    Type Name Description
    Transform trigger

    A reference Transform to consider for positional Volume blending

    LayerMask layerMask

    The LayerMask that the Volume manager uses to filter Volumes that it should consider for blending.

    Update(VolumeStack, Transform, LayerMask)

    Updates the Volume manager and stores the result in a custom VolumeStack.

    Declaration
    public void Update(VolumeStack stack, Transform trigger, LayerMask layerMask)
    Parameters
    Type Name Description
    VolumeStack stack

    The stack to store the blending result into.

    Transform trigger

    A reference Transform to consider for positional Volume blending.

    LayerMask layerMask

    The LayerMask that Unity uses to filter Volumes that it should consider for blending.

    See Also
    VolumeStack
    In This Article
    • Properties
      • baseComponentTypes
      • instance
      • stack
    • Methods
      • CheckBaseTypes()
      • CheckStack(VolumeStack)
      • CreateStack()
      • DestroyStack(VolumeStack)
      • IsComponentActiveInMask<T>(LayerMask)
      • Register(Volume, Int32)
      • Unregister(Volume, Int32)
      • Update(Transform, LayerMask)
      • Update(VolumeStack, Transform, LayerMask)
    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