- Home /
Refresh black bands on scene load
I have currently switched to unity 5.4.1 When I switch from game scene to main menu scene the camera gets resized. In game I currently have a camera which calculates its bounds based on screen resolution while on the main menù scene the gamera gets clipped to the resolution of a given background image.
What is happening is that when this resize occours when the main menù scene is loaded from the game scene everything that would fall in the black bands area don't become black bu remain still as if the scene would have loaded in additive mode. This is not the case and I don't know how to solve this.
To understand better the situation here a picture of my main menù scene
here is what happends when main menu is loaded from the game scene
and in the hierarchy there is no game scene any longer. I don't know how and if it is possible to refresh the camera blackbands somehow.
Any suggestion?
Answer by Suzuka91 · May 19, 2017 at 01:56 PM
Hi.
A bit late, but I hope it helps you or others with the same problem :)
The thing is you should clear the stencyl buffer when loading a new scene to get rid of the previous thing drawed.
Use GL.Clear() function:
GL.Clear(true, true, Color.black);
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
URP Unity second camera (From other scene) not being detected for stacking 0 Answers
Unity2D newbie camera issues. 1 Answer
GameObject and Camera 2 Answers
Terrain Distance 1 Answer