Rasagar/Library/PackageCache/com.unity.render-pipelines.high-definition/Editor/RenderPipeline/Raytracing/LightClusterEditor.cs

30 lines
1.1 KiB
C#
Raw Normal View History

2024-08-26 13:07:20 -07:00
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();
}
}
}