Struct MaterialHeaderScope
Create a toggleable header for material UI, must be used within a scope.
void OnGUI()
{
using (var header = new MaterialHeaderScope(text, ExpandBit, editor))
{
if (header.expanded)
EditorGUILayout.LabelField("Hello World !");
}
}
Implements
Inherited Members
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. |