I got 2D lighting working on my sprites using the tutorial below
But the lights seem to have no effect on tilemaps (walls and floors in my case), even though it’s targeting all sorting layers
How can I get 2D lights to affect tilemaps?
I got 2D lighting working on my sprites using the tutorial below
But the lights seem to have no effect on tilemaps (walls and floors in my case), even though it’s targeting all sorting layers
How can I get 2D lights to affect tilemaps?
I haven’t watched the video. Do the sprites you use on your tilemaps and your tilemaps renderers have a material with normal maps?
Here are screenshots of both in the inspector
Your tilemaps has the “sprite-default” material. Being 2D it cannot react to light.
Are you sure they don’t mention that in the tutorial you are following?
That’s definitely the issue as all other objects are using Sprite-Lit-Default. However, tilemaps do not allow me to select Sprite-Lit-Default as the material, only Sprites-Default?
The video I just posted is about adding custom materials to sprites; it’s the same process for tilemaps.
Excellent, thanks! I have one more issue if you don’t mind.
The point light appears in the Scene view, but doesn’t appear in the Game
Why could this be?
I had the same issue, setting the light to 0 on the Z (same as the sprites) made it work in game. Weird that it would display at any Z in the scene view but not in game.
in my case, I set the Z position of its transform really high (500+) and works.
That was it!
Here are the precise steps I went through to set up my TileMap with lighting. I had to fumble a bit, and thought to post in case it helps someone else.