docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VolumeProfileUtils

    Utility functions for handling VolumeProfiles in the editor.

    Inheritance
    object
    VolumeProfileUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering
    Assembly: Unity.RenderPipelines.Core.Editor.dll
    Syntax
    public static class VolumeProfileUtils

    Methods

    AddVolumeProfileContextMenuItems(ref GenericMenu, VolumeProfile, List<VolumeComponentEditor>, bool, string, Action<VolumeProfile>, Action, bool)

    Adds context menu dropdown items for a Volume Profile.

    Declaration
    public static void AddVolumeProfileContextMenuItems(ref GenericMenu menu, VolumeProfile volumeProfile, List<VolumeComponentEditor> componentEditors, bool overrideStateOnReset, string defaultVolumeProfilePath, Action<VolumeProfile> onNewVolumeProfileCreated, Action onComponentEditorsExpandedCollapsed = null, bool canCreateNewProfile = true)
    Parameters
    Type Name Description
    GenericMenu menu

    Dropdown menu to add items to

    VolumeProfile volumeProfile

    VolumeProfile associated with the context menu

    List<VolumeComponentEditor> componentEditors

    List of VolumeComponentEditors associated with the profile

    bool overrideStateOnReset

    Default override state for components when they are reset

    string defaultVolumeProfilePath

    Default path for the new volume profile<

    Action<VolumeProfile> onNewVolumeProfileCreated

    Callback when new volume profile has been created

    Action onComponentEditorsExpandedCollapsed

    Callback when all editors are collapsed or expanded

    bool canCreateNewProfile

    Whether it is allowed to create a new profile

    EnsureAllOverridesForDefaultProfile(VolumeProfile, VolumeProfile)

    Ensure the provided VolumeProfile contains every VolumeComponent, they are active and overrideState for every VolumeParameter is true. Obsolete and hidden components are excluded.

    Declaration
    public static void EnsureAllOverridesForDefaultProfile(VolumeProfile profile, VolumeProfile defaultValueSource = null)
    Parameters
    Type Name Description
    VolumeProfile profile

    VolumeProfile to use.

    VolumeProfile defaultValueSource

    An optional VolumeProfile asset containing default values to use for any components that are added to profile.

    OnVolumeProfileContextClick(Vector2, VolumeProfile, List<VolumeComponentEditor>, bool, string, Action<VolumeProfile>, Action)

    Draws the context menu dropdown for a Volume Profile.

    Declaration
    public static void OnVolumeProfileContextClick(Vector2 position, VolumeProfile volumeProfile, List<VolumeComponentEditor> componentEditors, bool overrideStateOnReset, string defaultVolumeProfilePath, Action<VolumeProfile> onNewVolumeProfileCreated, Action onComponentEditorsExpandedCollapsed = null)
    Parameters
    Type Name Description
    Vector2 position

    Context menu position

    VolumeProfile volumeProfile

    VolumeProfile associated with the context menu

    List<VolumeComponentEditor> componentEditors

    List of VolumeComponentEditors associated with the profile

    bool overrideStateOnReset

    Default override state for components when they are reset

    string defaultVolumeProfilePath

    Default path for the new volume profile

    Action<VolumeProfile> onNewVolumeProfileCreated

    Callback when new volume profile has been created

    Action onComponentEditorsExpandedCollapsed

    Callback when all editors are collapsed or expanded

    UpdateGlobalDefaultVolumeProfileWithConfirmation<TRenderPipeline>(VolumeProfile, VolumeProfile)

    Assign the global default default profile to VolumeManager. Ensures that defaultVolumeProfile contains overrides for every component. If defaultValueSource is provided, it will be used as the source for default values instead of default-constructing them. If components will be added to the profile, a confirmation dialog is displayed.

    Declaration
    public static bool UpdateGlobalDefaultVolumeProfileWithConfirmation<TRenderPipeline>(VolumeProfile globalDefaultVolumeProfile, VolumeProfile defaultValueSource = null) where TRenderPipeline : RenderPipeline
    Parameters
    Type Name Description
    VolumeProfile globalDefaultVolumeProfile

    VolumeProfile asset assigned in pipeline global settings.

    VolumeProfile defaultValueSource

    An optional VolumeProfile asset containing default values to use for any components that are added to globalDefaultVolumeProfile.

    Returns
    Type Description
    bool

    Whether the operation was confirmed

    Type Parameters
    Name Description
    TRenderPipeline

    The type of RenderPipeline that this VolumeProfile is used for. If it is not the active pipeline, the function does nothing.

    UpdateGlobalDefaultVolumeProfile<TRenderPipeline>(VolumeProfile, VolumeProfile)

    Assign the global default default profile to VolumeManager. Ensures that defaultVolumeProfile contains overrides for every component. If defaultValueSource is provided, it will be used as the source for default values instead of default-constructing them.

    Declaration
    public static void UpdateGlobalDefaultVolumeProfile<TRenderPipeline>(VolumeProfile globalDefaultVolumeProfile, VolumeProfile defaultValueSource = null) where TRenderPipeline : RenderPipeline
    Parameters
    Type Name Description
    VolumeProfile globalDefaultVolumeProfile

    VolumeProfile asset assigned in pipeline global settings.

    VolumeProfile defaultValueSource

    An optional VolumeProfile asset containing default values to use for any components that are added to globalDefaultVolumeProfile.

    Type Parameters
    Name Description
    TRenderPipeline

    The type of RenderPipeline that this VolumeProfile is used for. If it is not the active pipeline, the function does nothing.

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