Hello, I am making a 2d unity game and everything works fine in the editor and game view. But when I export it for android and open it on my phone through google play all the sprites turn black (The water doesn’t because it is unlit). Is there a setting in player settings or something like that?
Here are some screen shots (sorry it only lets me post one screen shot):
Check the device logs to see if you’re getting any shader errors.
If not then review your sprite sorting layer and sorting order values.
If any are the same then which is in front is luck of the draw, so make them different.
More reading:
Three (3) primary ways that Unity draws / stacks / sorts / layers / overlays stuff:
In short, as far as the Standard Rendering Pipeline,
The default 3D Renderers draw stuff according to Z depth - distance from camera.
SpriteRenderers draw according to their Sorting Layer and Sorting Depth properties
UI Canvas Renderers draw in linear transform sequence, like a stack of papers
If you find that you need to mix and match items using these different ways of rendering, and have them appear in ways they are not initially designed for, you need to:
identify what you are using
search online for the combination of things you are doing and how to to achieve what you want.
There may be more than one solution to try.
For instance, you may even use multiple co-located cameras to more-explicitly control apparent draw ordering.
Additional reading in the official docs:
And SortingGroups can also be extremely helpful in certain circumstances:
Other rendering pipelines may have other ways of layering (HDRP and URP). Go see the latest docs for details.
There’s lots of third party open source packages available as well, such as this:
So I used a log cat and this is all I am getting from unity. Is anything here bad or stopping the lighting? Also can I be hack if I post this?
05-06 15:54:46.490 23208 23227 I Unity : MemoryManager: Using ‘Dynamic Heap’ Allocator.
05-06 15:54:46.510 23208 23227 I Unity : SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 7477mb
05-06 15:54:46.510 23208 23227 I Unity : SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
05-06 15:54:46.510 23208 23227 I Unity : ApplicationInfo com.doodleco.fancyfishing version 5.5
05-06 15:54:46.510 23208 23227 I Unity : Built from ‘2022.3/staging’ branch, Version ‘2022.3.7f1 (b16b3b16c7a0)’, Build type ‘Release’, Scripting Backend ‘il2cpp’, CPU ‘arm64-v8a’, Stripping ‘Enabled’
05-06 15:54:46.664 23208 23227 I Unity : Company Name: Doodle Co
05-06 15:54:46.664 23208 23227 I Unity : Product Name: Fancy Fishing