Exit Bug

Hello. I’m having an issue with the exit. On the first level I made it looks normal. But when I dragged it onto the second level it’s completely black. Is there a way to fix this?
prefab issue
Preafab isssu 2

Hi Orion2002,

First of all, check the position of the exit game object in both scenes. Make sure that they do not share the same z-position as the sprites in the background. Otherwise, you might experience the infamous z-fighting effect.

If the z-positions are different but the problem persists, click the game object with the black sprite. Then check the material at the bottom of the Inspector. The material should have an ‘unlit’ shader assigned. If it is another shader which requires a light source, the material might look black because there is no lighting in the scene.

Rick does not use any light in his game, so you do not need one either. If the material has got a non-unlit shader assigned, note down the name of the current shader. Then test the other shaders in the dropdown menu. If something goes wrong, simply reassign the initial shader.

As a side note, since multiple game objects might share the same material, changing something in the material might affect those game objects. If that happens but you need a different shader on one game object, simply create a new material in your Assets folder, assign it to your game object, and change the material as you need it. Only the game objects which use this new material will get affected by the changes on that material.

Did this help?


See also:

I’ve managed to find the issue. On Global Light 2D the lighting for the layer interactables was disabled and made the exit black.

Thanks for sharing your solution! :slight_smile:

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

Privacy & Terms