docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VolumeComponentListEditor

    Unity uses this class to draw the user interface for all the settings contained in a VolumeProfile in the Inspector.

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

    A minimal example of how to write a custom editor that displays the content of a profile in the inspector:

    using UnityEngine.Rendering;
    

    [CustomEditor(typeof(VolumeProfile))] public class CustomVolumeProfileEditor : Editor { VolumeComponentListEditor m_ComponentList;

    void OnEnable()
    {
        m_ComponentList = new VolumeComponentListEditor(this);
        m_ComponentList.Init(target as VolumeProfile, serializedObject);
    }
    
    void OnDisable()
    {
        if (m_ComponentList != null)
            m_ComponentList.Clear();
    }
    
    public override void OnInspectorGUI()
    {
        serializedObject.Update();
        m_ComponentList.OnGUI();
        serializedObject.ApplyModifiedProperties();
    }
    

    }

    Constructors

    VolumeComponentListEditor(Editor)

    Creates a new instance of VolumeComponentListEditor to use in an existing editor.

    Declaration
    public VolumeComponentListEditor(Editor editor)
    Parameters
    Type Name Description
    Editor editor

    A reference to the parent editor instance

    Properties

    asset

    A direct reference to the VolumeProfile this editor displays.

    Declaration
    public VolumeProfile asset { get; }
    Property Value
    Type Description
    VolumeProfile

    editors

    List of all VolumeComponentEditors

    Declaration
    public List<VolumeComponentEditor> editors { get; }
    Property Value
    Type Description
    List<VolumeComponentEditor>

    Methods

    Clear()

    Cleans up the editor and individual VolumeComponentEditor instances. You must call this when the parent editor is disabled or destroyed.

    Declaration
    public void Clear()

    Init(VolumeProfile, SerializedObject)

    Initializes the editor.

    Declaration
    public void Init(VolumeProfile asset, SerializedObject serializedObject)
    Parameters
    Type Name Description
    VolumeProfile asset

    A direct reference to the profile Asset.

    SerializedObject serializedObject

    An instance of the SerializedObject provided by the parent editor.

    OnGUI()

    Draws the editor.

    Declaration
    public void OnGUI()

    SetIsGlobalDefaultVolumeProfile(bool)

    Set whether the editor behaves as a default volume profile.

    Declaration
    public void SetIsGlobalDefaultVolumeProfile(bool isDefaultVolumeProfile)
    Parameters
    Type Name Description
    bool isDefaultVolumeProfile

    If set to true, the editor treats the volume profile as the default global profile; otherwise, it treats it as a custom profile.

    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)
    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)