Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug [Solved] Re-enabling ShadowCaster2D adds draw calls

Discussion in '2D' started by Djayp, Dec 24, 2021.

  1. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
    Hello ! Disabling and re-enabling a Shadow Caster 2D adds more draw calls than it should. I counldn't find any fix for this in the changelogs, is there any fix implemented/I can implement ? I'll try to update to 7.7.1 but I have some modified scripts. Happy Xmas !

    Unity 2019.4.31f
    URP 7.3.1
     
  2. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
    Found it !

    Code (CSharp):
    1. ShadowCasterGroup2DManager.RemoveGroup(this);
    This is missing from OnDisable.