From a29d1c68f6a20e7c98b80ced68bf19a59a5495bc Mon Sep 17 00:00:00 2001 From: z3y Date: Sun, 1 Sep 2024 15:15:22 +0200 Subject: [PATCH] only show when properties exist --- Editor/Targets/Lit/LitTemplate.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Editor/Targets/Lit/LitTemplate.cs b/Editor/Targets/Lit/LitTemplate.cs index c123c55..097d310 100644 --- a/Editor/Targets/Lit/LitTemplate.cs +++ b/Editor/Targets/Lit/LitTemplate.cs @@ -191,8 +191,10 @@ public override void OnBeforeBuild(ShaderBuilder builder) { builder.dependencies.Add(customLightingPath); - - builder.properties.Add(new PropertyDescriptor(PropertyType.Float, "Custom Lighting", "_CustomLighting") { customAttributes = "[Foldout]" }); + if (customLightingInclude.properties.Count > 0) + { + builder.properties.Add(new PropertyDescriptor(PropertyType.Float, "Custom Lighting", "_CustomLighting") { customAttributes = "[Foldout]" }); + } foreach (var p in customLightingInclude.properties) { builder.properties.Add(p);