2 using UnityEditor.Rendering;
4 using UnityEngine.Experimental.Rendering.HDPipeline;
6 namespace UnityEditor.Experimental.Rendering.HDPipeline
8 using CED = CoreEditorDrawer<SerializedProxyVolume>;
12 internal static GUIContent shapeContent = EditorGUIUtility.TrTextContent("Shape", "The shape of the Proxy.\nInfinite is compatible with any kind of InfluenceShape.");
13 internal static GUIContent boxSizeContent = EditorGUIUtility.TrTextContent("Box Size", "The size of the box.");
14 internal static GUIContent sphereRadiusContent = EditorGUIUtility.TrTextContent("Sphere Radius", "The radius of the sphere.");
16 public static readonly CED.IDrawer SectionShape = CED.Group((serialized, owner) =>
18 if (serialized.shape.hasMultipleDifferentValues)
20 EditorGUI.showMixedValue = true;
21 EditorGUILayout.PropertyField(serialized.shape, shapeContent);
22 EditorGUI.showMixedValue = false;
26 EditorGUILayout.PropertyField(serialized.shape, shapeContent);
28 switch ((ProxyShape)serialized.shape.intValue)
31 EditorGUILayout.PropertyField(serialized.boxSize, boxSizeContent);
33 case ProxyShape.Sphere:
34 EditorGUILayout.PropertyField(serialized.sphereRadius, sphereRadiusContent);
36 case ProxyShape.Infinite:
38 default: throw new ArgumentOutOfRangeException();