Skip to content

Commit

Permalink
🐛 fix: Fix shadow override
Browse files Browse the repository at this point in the history
  • Loading branch information
esnya committed Aug 6, 2021
1 parent bac43ac commit b5d750b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Assets/EsnyaUnityTools/Scripts/StaticProfile.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
Expand Down Expand Up @@ -79,6 +79,16 @@ public void Apply()
}
}

if (overrideShadowSettings)
{
foreach (var renderer in o.GetComponents<Renderer>())
{
Undo.RecordObject(renderer, "Override Shadow Settings");
renderer.shadowCastingMode = shadowCastingMode;
renderer.receiveShadows = receiveShadow;
}
}

if (overrideColliders)
{
switch (colliderModification)
Expand Down

0 comments on commit b5d750b

Please sign in to comment.