Tiles turned black when I added sorting layers

My tiles in the scene view turned black when I added sorting layers. Why is this?

I changed the sorting layer to “Default” and the textures reappeared…

1 Like

I believe the issue may be that the Platforms are being rendered first, then the Background is being rendered on top. You might swap the order in your Tilemap Grid to put the Background Tilemap above the Platforms Tilemap and see if that helps.

RenderOrder

I thought that too, but I just moved the platforms below the backgroundTilemap and the platforms layer is still black…

Update: I think it has something to do with lighting. I uncheck the lightbulb at the top of my scene window and the platform textures reappear… and disappear when I reenable the lights.

2 Likes

That’s not a bad idea. I haven’t done TileVania yet so I don’t think I have any better suggestions at the moment.

1 Like

Hi @sunlightsurge,

I think you might be right about the lighting. Select another material, ideally, one that uses an “unlit” shader. If necessary create your own material in the Assets folder.

image


See also:

3 Likes

After lots of exploring and testing, I’ve discovered if you’re using the Universal Rendering Pipeline (URP) you have to go to your scene light and tick the sorting layers (see screenshot). By default, new sorting layers are not automatically added, hence why when you assign a sorting layer your textures go black (ie unlit).

I hope this helps everyone!

CleanShot 2023-09-07 at 18.37.25

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms