From d2ab30e7a69bfe7efda63ae75812207377917bd3 Mon Sep 17 00:00:00 2001
From: miepzerino <o.skotnik@gmail.com>
Date: Sun, 30 Mar 2025 18:50:27 +0000
Subject: [PATCH] Merge branch 'Flexalon-UI-Layouts' into develop

---
 Assets/Flexalon/Samples/Runtime/SampleLightConfig.cs |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/Assets/Flexalon/Samples/Runtime/SampleLightConfig.cs b/Assets/Flexalon/Samples/Runtime/SampleLightConfig.cs
new file mode 100644
index 0000000..dd761c6
--- /dev/null
+++ b/Assets/Flexalon/Samples/Runtime/SampleLightConfig.cs
@@ -0,0 +1,33 @@
+using UnityEngine;
+using UnityEngine.Rendering;
+
+namespace Flexalon.Samples
+{
+    [ExecuteAlways]
+    public class SampleLightConfig : MonoBehaviour
+    {
+        public float StandardIntensity = 3.14f;
+        public float HDRPIntensity = 20000f;
+
+        void Update()
+        {
+            var light = GetComponent<Light>();
+            if (light)
+            {
+#if UNITY_6000_0_OR_NEWER
+                var renderPipeline = GraphicsSettings.defaultRenderPipeline;
+#else
+                var renderPipeline = GraphicsSettings.renderPipelineAsset;
+#endif
+                if (renderPipeline?.GetType().Name.Contains("HDRenderPipelineAsset") ?? false)
+                {
+                    light.intensity =  HDRPIntensity;
+                }
+                else
+                {
+                    light.intensity = StandardIntensity;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3