You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.2 KiB
29 lines
1.2 KiB
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--;
|
|
}
|
|
}
|
|
}
|