- Home /
Main Camera for a 2d-Game is blue! The scene and all the objects are not shown!
This is my third-day using unity, and I am developing a 2d game to learn the basics. So far everything seemed to be working fine until I changed every transform data for every object with respect to the z-axis to 0. Since then the Game scene turned blue and all the sprites and objects are "gone" from the Game display!
Does anyone have an idea of how to fix this problem? And what caused it in the first place?
PS: I've also lost some of the controls on few objects and everything started to seem a bit awkward!
Answer by TanselAltinel · Jan 09, 2018 at 08:47 AM
Why do you change Z axis of every object? 2D is independent of the Z axis, and you should just use sort order for sorting sprites to camera view.
Scene turning blue is not an error. It indicates that Camera renders the scene (it is default color). If you open a new scene, you'll see that it's blue. So no issues there. Only issue is that you have removed all your objects from your camera view. Meaning, Camera does not see your objects to render.
To fix the problem, check your camera settings, and ideally move to 3D view (you can do so by clicking 2D button on upper left part of the scene view, scene will switch to 3D) and you will see your camera view. From there, you can check if your objects are in the camera view.
Then move your objects into Camera view or change camera near/far clips to adjust camera view.