I’m having a problem with lights and 2D sprites. The issue is that when I use the point light and overlap with another sprite I can see through it.
So the sprites become way too transparency when using the Sprite/Diffuse shader. Is there any other way to fix this beside changing the z position or the order in layer? Is there a way to fix this by making a custom shader?
Below is a picture to make it more clear what I mean:
// Use this for initialization
void Start () {
spriteRenderer = GetComponent<SpriteRenderer>();
spriteRenderer.sortingLayerName = "Enemy";
spriteRenderer.sortingOrder = Random.Range(1,100);,Hi, I've had the same issue so in Enemy script, I've done this: