#[Android Build] Black screen yet game is playing in the background

1 messages · Page 1 of 1 (latest)

mossy orbit
#

Hi there
I'm having this issue where since i installed my ios platform tools, my android build is not behaving like it used to.
I created a build profile for IOS, separately, so really i think it's not related i guess. It's just when things changed in my perspective.

What is going on is that when i build, my game runs as a black screen. I can hear it, i can touch it, i can log it even with the remote option on the unity console, i get my usual editor logs, but it just is displaying a black screen.
I couldn't find anything relevant for me online, tried to change the camera color but now i just know its not the camera color.
Just in case i did build it on another phone but exact same issues.

Big clue is that i reverted to earlier commits that 1000% worked and yet it isn't working at all still.

Any clues? 🥹

knotty hill
#

Use frame debugger to see what is rendered and how/why.

mossy orbit
# knotty hill Use frame debugger to see what is rendered and how/why.

How may i use the frame debugger in build?
Sorry, it may have not been clear but everything is working perfectly at editor runtime. Build runtime is my only issue
-# (Don't hesitate to ping me if you answer me, really, i'm a big boy i can take it) (i am blind and will never see ur response otherwise lol)

knotty hill
#

If it's android build, you to connect the device to your PC via usb and assuming your env is configured correctly, the editor should attach to the build/provide you the device to attach to in the mentioned tools.

mossy orbit
#

to be fair i don't have much advanced knowledge of the frame debugger, i mainly used it to see why i couldn't see some UI at some point, but i've got no idea on how to interpret this.
all i can say is that everything is getting drawn by the size of my phone's screen i guess?

knotty hill
#

And transparent too.

#

Do they all seem to be grey too?

#

Take a screenshot of a few.

mossy orbit
knotty hill
#

show actual draw calls please.

#

Output is supposed to show the rendering at the point of that draw call. Canvases are rendered last, so that unrelated.

mossy orbit
#

wups, sorry :)
It's because it doesn't actually draw anything different.

#

each drawcall loks the same on the preview "output" image

knotty hill
#

All of these are RT clears(I think).

#

Select something here in the middle

#

It would also help if you show more "details" from that draw call, like the used shader

mossy orbit
#

here !

knotty hill
#

Oh, that was canvas draw call... Didn't notice...
Can you now provide similar screenshots of a frame in the editor?

#

Is your whole game basically just ui?

mossy orbit
#

it's ok :)
Though i've got an end of week meeting right now, i might be on in about 2h

knotty hill
#

I can only see 2-4 draws that are not ui, which doesn't seem right for a real game either.

mossy orbit
#

here's an editor preview.

#

of what it should look like.

knotty hill
# mossy orbit here's an editor preview.

Sorry, forgot about this topic for a while.
If you still have the issue, can you share more details on the second draw call that you selected? What shader, meshes, textures does it use. It should all be in the frame debugger details.

mossy orbit
#

Here's the one in build

#

here's in editor

mossy orbit
#

Update :

  • Created a new scene
  • Built it
  • same result
mossy orbit
#

also, tried to create a new project, same unity version, build : worked.

#

ok funny thing : i activated the unity default splash screen at the beginning of the game, but it did NOT show. We can definetly conclude it's a project settings issue, isn't it?
I did change the color space to gamma but nothing changed.

#

(publishing settings as well, excluding the keystore)

knotty hill
mossy orbit
#

When i did not mention what was in the new scene, it's because there was nothing, my bad lol

knotty hill
#

Is the skybox using the custom shader you were talking about?

mossy orbit
#

nope

#

default new scene we all know, i promise

knotty hill
#

Try adding a default cube/sphere and test just to be safe.

mossy orbit
#

i'm off testing greater things first.
My app is a "two in one". I've got one git branch for my android mobile build, and another for my VR build. The two apps are twins and work as one, the connect to each other.
I'm going to attempt building the VR app, see if that works. I'll get back to you.

mossy orbit
# knotty hill Try adding a default cube/sphere and test just to be safe.

While it builds, i'd like to ask you : I understand the "just to be safe" theory. What are you curious to see with this new cube? If the frame debugger tells us it has the default URP lit material? Because in 5-6 years of practicing Unity, i have to admit i never thought of adding a default cube in my scene thinking i could test anything else out
Would it be just to see if it does render?

pallid pivot
#

having a proxy object to test each thing isn't a bad idea. If your default scene is already black though, it's not the material. Something is wrong in the rendering stack. I would keep stripping things out until you find it. For example, disabling postprocessing, disabling shader stripping, reverting to previous versions (your project is source-controlled right?), even all the way back to a default project with default scene if you have to

mossy orbit
#

ding dong, good news, vr build works like a charm. At this point i'm going to delete my Library folder to see if my VR SDK hasn't hidden any sh*t from me, which wouldn't be the first time.

knotty hill
mossy orbit
pallid pivot
#

if previous builds that used to work do not work, I would go directly to the sanity check project (default, entirely new project + default scene -> build). Maybe the issue is something on the device instead

mossy orbit
knotty hill
# mossy orbit Gotcha! Well to be fair we saw the UI Default was "rendered", or at least that's...

Yeah. But it would make for a better proof to test with a separate default shader as well. It always helps to eliminate factors from the equation.
If that doesn't help, though, then as xEvilReeperx said, it's likely a global issue with the renderer or maybe even deeper.
First step should indeed be deleting the library and letting it reimport.

If that doesn't help, a few things I'd test:

  • switch to a different graphics api.
  • try resetting the platform player settings to default.
  • use dedicated graphics debugging tools for the platform/device.
mossy orbit
#

my goats, my ceos even ;
I am in shambles
For deleting the Library folder and restarting unity fixed everything.