-
Notifications
You must be signed in to change notification settings - Fork 871
Expand file tree
/
Copy pathPropertiesPreferencesProvider.cs
More file actions
29 lines (26 loc) · 1.24 KB
/
PropertiesPreferencesProvider.cs
File metadata and controls
29 lines (26 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
namespace UnityEditor.Rendering
{
[DisplayInfo(name = "Properties", order = 100)]
class PropertiesPreferencesProvider : ICoreRenderPipelinePreferencesProvider
{
class Styles
{
public static readonly GUIContent additionalPropertiesLabel = EditorGUIUtility.TrTextContent("Advanced Properties", "Tells Unity to show or hide Advanced Properties.");
public static readonly GUIContent[] additionalPropertiesNames = { EditorGUIUtility.TrTextContent("All Visible"), EditorGUIUtility.TrTextContent("All Hidden") };
public static readonly int[] additionalPropertiesValues = { 1, 0 };
}
static List<string> s_SearchKeywords = new() { "Additional", "Advanced", "Properties" };
public List<string> keywords => s_SearchKeywords;
public void PreferenceGUI()
{
EditorGUI.indentLevel++;
AdvancedProperties.enabled = EditorGUILayout.IntPopup(Styles.additionalPropertiesLabel,
AdvancedProperties.enabled ? 1 : 0, Styles.additionalPropertiesNames,
Styles.additionalPropertiesValues) == 1;
EditorGUI.indentLevel--;
}
}
}