Skip to content

Commit

Permalink
Improved editor warning messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGraterUnity committed Aug 8, 2023
1 parent ec5d969 commit 941b1b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 941b1b5

Please sign in to comment.