docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MaterialHeaderScope

    Create a toggleable header for material UI, must be used within a scope. Example:

    void OnGUI()
    {
        using (var header = new MaterialHeaderScope(text, ExpandBit, editor))
        {
            if (header.expanded)
                EditorGUILayout.LabelField("Hello World !");
        }
    }
    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.Rendering
    Assembly: Unity.RenderPipelines.Core.Editor.dll
    Syntax
    public struct MaterialHeaderScope : IDisposable

    Constructors

    Name Description
    MaterialHeaderScope(string, uint, MaterialEditor, bool, bool)

    Creates a material header scope to display the foldout in the material UI.

    MaterialHeaderScope(GUIContent, uint, MaterialEditor, bool, bool, uint, string)

    Creates a material header scope to display the foldout in the material UI.

    Fields

    Name Description
    expanded

    Indicates whether the header is expanded or not. Is true if the header is expanded, false otherwise.

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)