Search Unity

Question How do I make a 2d tilemap cast shadows?

Discussion in 'Universal Render Pipeline' started by disappointedcreeper, May 7, 2023.

  1. disappointedcreeper

    disappointedcreeper

    Joined:
    Oct 23, 2021
    Posts:
    27
    I have a procedurally generated tilemap that can be changed by the player, like terraria, and I want to have it cast shadows. I think a way of doing it is by generating a shadow caster around the player based on the composite of the tilemap.
     
  2. disappointedcreeper

    disappointedcreeper

    Joined:
    Oct 23, 2021
    Posts:
    27
    The only way I can think of doing this is by making a script that creates a shadow caster for each tile around the player, but that causes way too many crashes.