From 941b1b5aa90eca9047b3731dd3ac869f52d4e971 Mon Sep 17 00:00:00 2001 From: Ben Grater Date: Tue, 8 Aug 2023 16:26:55 -0700 Subject: [PATCH] Improved editor warning messages. --- .../Editor/Effects/AmbientOcclusionEditor.cs | 10 ++++++++-- .../Editor/Effects/AutoExposureEditor.cs | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/com.unity.postprocessing/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs b/com.unity.postprocessing/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs index 4c0a456e3f7..356250e5615 100644 --- a/com.unity.postprocessing/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs +++ b/com.unity.postprocessing/PostProcessing/Editor/Effects/AmbientOcclusionEditor.cs @@ -49,8 +49,14 @@ public override void OnInspectorGUI() } else if (aoMode == (int)AmbientOcclusionMode.MultiScaleVolumetricObscurance) { - if (!SystemInfo.supportsComputeShaders || EditorUtilities.isTargetingAndroid || EditorUtilities.isTargetingWebGL) - EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires compute shader support.", MessageType.Warning); + if (!SystemInfo.supportsComputeShaders || EditorUtilities.isTargetingWebGL) + { + EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires compute shader support which is not avaialable on this platform.", MessageType.Error); + } + else if(EditorUtilities.isTargetingAndroid) + { + EditorGUILayout.HelpBox("Multi-scale volumetric obscurance requires compute shader support (Vulkan) when running on Android.", MessageType.Warning); + } PropertyField(m_ThicknessModifier); PropertyField(m_ZBias); diff --git a/com.unity.postprocessing/PostProcessing/Editor/Effects/AutoExposureEditor.cs b/com.unity.postprocessing/PostProcessing/Editor/Effects/AutoExposureEditor.cs index 7393b66478e..1d84bbb8939 100644 --- a/com.unity.postprocessing/PostProcessing/Editor/Effects/AutoExposureEditor.cs +++ b/com.unity.postprocessing/PostProcessing/Editor/Effects/AutoExposureEditor.cs @@ -31,8 +31,14 @@ public override void OnEnable() public override void OnInspectorGUI() { - if (!SystemInfo.supportsComputeShaders || EditorUtilities.isTargetingAndroid || EditorUtilities.isTargetingWebGL) - EditorGUILayout.HelpBox("Auto exposure requires compute shader support.", MessageType.Warning); + if (!SystemInfo.supportsComputeShaders || EditorUtilities.isTargetingWebGL) + { + EditorGUILayout.HelpBox("Auto exposure requires compute shader support which is not avaialable on this platform.", MessageType.Error); + } + else if (EditorUtilities.isTargetingAndroid) + { + EditorGUILayout.HelpBox("Auto exposure requires compute shader support (Vulkan) when running on Android.", MessageType.Warning); + } EditorUtilities.DrawHeaderLabel("Exposure");