Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Resolved 2d Shadow Caster Working in Editor, but not Play Mode

Discussion in '2D Experimental Preview' started by MadboyJames, Oct 14, 2020.

  1. MadboyJames

    MadboyJames

    Joined:
    Oct 28, 2017
    Posts:
    262
    Hi, I'm having a bit of trouble getting the 2d Shadow Caster to work. In the Editor I can see the casters working fine, but when I run my scene (or just look at the camera output while in the editor) the shadows are not cast. I tried messing around with my camera settings, but to no avail. Anyone have an idea about what could be causing this?


    EDIT: I am able to create a new project and have the URP 2D Shadowcaster work as expected, but I still cannot figure out what the difference is in my original project. I'm fairly certain that Shadow Draw distance is not the issue, as setting it to 10000 had no effect.
     
    Last edited: Oct 15, 2020
  2. MadboyJames

    MadboyJames

    Joined:
    Oct 28, 2017
    Posts:
    262
    My Camera was too close to render the shadows. *facepalm*

    EDIT: For those who come after: The issue had to do with CinemachineVirtualCamera resetting my camera position to be rather close to the player character it was following.
     
    Last edited: Oct 15, 2020
    NotaNaN likes this.