Skip to content

Commit

Permalink
Blob Shadows: make static shadow casters actually dynamic while the a…
Browse files Browse the repository at this point in the history
…pplication is not playing [closes #204]
  • Loading branch information
Delt06 committed Jan 2, 2024
1 parent 9d3a8c9 commit aba3d58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public bool IsStatic
}
}

public static bool ForceUpdateRenderers => !Application.isPlaying;

private void Awake()
{
_transform = transform;
Expand Down Expand Up @@ -193,7 +195,7 @@ private void RecomputeRendererData(ref ToonBlobShadowsRendererData rendererData,
{
changed = false;

if (_isStatic && !forceRecompute && !_allDirty)
if (_isStatic && !ForceUpdateRenderers && !forceRecompute && !_allDirty)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void AddRenderer(ToonBlobShadowRenderer renderer)
{
_renderers.Add(renderer);

if (!renderer.IsStatic)
if (!renderer.IsStatic || ToonBlobShadowRenderer.ForceUpdateRenderers)
{
_dynamicRenderers.Add(renderer);
}
Expand Down

0 comments on commit aba3d58

Please sign in to comment.