Skip to content

Commit

Permalink
only show when properties exist
Browse files Browse the repository at this point in the history
  • Loading branch information
z3y committed Sep 1, 2024
1 parent bb2521d commit a29d1c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Editor/Targets/Lit/LitTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a29d1c6

Please sign in to comment.