using System; using UnityEditor.Rendering; using UnityEditor.UIElements; using UnityEditor.VersionControl; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; using UnityEngine.UIElements; namespace UnityEditor.Rendering.Universal { [CustomPropertyDrawer(typeof(URPDefaultVolumeProfileSettings))] [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] class URPDefaultVolumeProfileSettingsPropertyDrawer : DefaultVolumeProfileSettingsPropertyDrawer { GUIContent defaultVolumeProfileAssetLabel => EditorGUIUtility.TrTextContent("Default Profile", "Settings that will be applied project-wide to all Volumes by default when URP is active."); protected override GUIContent volumeInfoBoxLabel => EditorGUIUtility.TrTextContent( "The values in the Default Volume can be overridden by a Volume Profile assigned to URP asset and Volumes inside scenes."); protected override VisualElement CreateAssetFieldUI() { VisualElement profileLine = new(); var toggle = new Toggle(); toggle.AddToClassList(Foldout.toggleUssClassName); var checkmark = toggle.Q(className: Toggle.checkmarkUssClassName); checkmark.AddToClassList(Foldout.checkmarkUssClassName); var field = new ObjectField(defaultVolumeProfileAssetLabel.text) { tooltip = defaultVolumeProfileAssetLabel.tooltip, objectType = typeof(VolumeProfile), value = m_VolumeProfileSerializedProperty.objectReferenceValue as VolumeProfile, }; field.AddToClassList("unity-base-field__aligned"); //Align with other BaseField field.Q