- Home /
Sprites render before UI when starting game first time
Hey all!
So my game is a single scene game, the start menu is just a canvas that I disable when the game starts. The problem I am facing is that the first time I start the game on my device the 2d sprites are visible before the canvas can hide them. This makes for an annoying bug where the game setting is visible for a few milliseconds before the start menu actual is brought up. Here is a gif of what it looks like from my reddit post: https://www.reddit.com/r/Unity3D/comments/av1x5r/hairpulling_bug_sprites_render_before_ui_when/
What I think it could be:
Z-axis is wrong
The order of the objects in the inspector is wrong
The Layer is wrong
The order in layer is wrong
The render mode of the canvas is wrong
I have attached images of the settings in the inspector
This is the setting on the loading screen
This is the setting on the main camera, which seems to render its contents before the canvas
Answer by Damien35 · Feb 26, 2019 at 07:30 PM
Hi,
Have a look at this documentation : https://docs.unity3d.com/Manual/class-MonoManager.html By changing scripts execution order you should solve your problem.
regards
I tried adding a script to it and putting that script as the first thing to be executed but somehow the main camera is rendered even before that. I went with the "solution" of using multiple scenes. Not the solution I like but it is the fastest and I can't lose more time to this annoying issue...
Your answer
Follow this Question
Related Questions
Problem with layers impedes playing 1 Answer
Layer change in Desktop application 0 Answers
OverlapSphere doesn't detect colliders 1 Answer
How to add layer to layer mask? 1 Answer
Shadows and Layers 0 Answers