Rasagar/Library/PackageCache/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/LightClusterEditor.cs
2024-08-26 23:07:20 +03:00

30 lines
1.1 KiB
C#

using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
namespace UnityEditor.Rendering.HighDefinition
{
[CanEditMultipleObjects]
[CustomEditor(typeof(LightCluster))]
class LightClusterEditor : VolumeComponentEditor
{
public override void OnInspectorGUI()
{
HDEditorUtils.EnsureFrameSetting(FrameSettingsField.RayTracing, "Raytracing");
HDRenderPipelineAsset currentAsset = HDRenderPipeline.currentAsset;
bool notSupported = currentAsset != null && !currentAsset.currentPlatformRenderPipelineSettings.supportRayTracing;
if (notSupported)
{
EditorGUILayout.Space();
HDEditorUtils.QualitySettingsHelpBox(HDRenderPipelineUI.Styles.rayTracingUnsupportedMessage,
MessageType.Warning, HDRenderPipelineUI.ExpandableGroup.Rendering,
"m_RenderPipelineSettings.supportRayTracing");
}
using var disableScope = new EditorGUI.DisabledScope(notSupported);
base.OnInspectorGUI();
}
}
}