I am working on a little mobile game in Unity in 2D. I want the player to be a light source and everything else to be dark, so I gave "everything else" the sprites/diffuse material. This works extremely well in the editor/Game view in Unity, but when I build to my Android phone it looks weird. See the pictures. Any ideas?
Currently I am using the realtime rendering mode for the light, I know it is not efficient, but that's a problem for later. I looked into baked lighting, but I spawn the rooms random and dynamically so I am not sure how to proceed there.
I can find very little information about lighting in 2D mobile games in Unity, not sure how to proceed, it is all very confusing.
How can I make the lighting look the same on the phone as in the editor/game view in Unity?
Sry for writing an answer instead of a comment, but I'm new to SO and don't have the rep to write comments, yet. I had similar issues on my Android build and we would need way more information in order to help you. (1) Are you building for Android, iOS or both? (2) Check your graphics emulation. Make sure you use OpenGL3. (3) Check your graphics tier upon build. Try to use the highest tier with high settings. Lower tier settings might result in bad light. (4) Not necessarily corresponding to your issue but you might wanna try building with a 32-bit display buffer and see what happens. (5) Are you using post processing effects? There is very limited support on mobile devices. (6) Check the priority of each light source you are using. (7) Maybe it's a shader issue? Have you tried using mobile shaders?
Hope this helps, again, sry for answer while not being 100% sure. Cheers.