- Home /
Camera not displaying any gameobjects in scene
Complete unity noob here so please accept my apologies in advance for what is likely such a basic question...
I've been putting a game together, which was working fine. Then I decided to reset the transform for most of my game objects to center everything up neatly. As part of this, I reset my MainCamera object's transform, and now I can't see any of my GameObjects in the game (as per the screenshot.) The camera is aligned so it should show everything, and in scene mode I can see everything. All of my GameObjects (including camera) are on the Default layer (with obvious exception of UI elements) which is definately not disabled/locked, yet nothing appears in Game mode.
Any help would be much appreciated, thanks in advance!
Answer by Kiwasi · Feb 19, 2015 at 09:15 AM
Quick trick for dealing with camera issues in 2D games. Click on 2D up on the bar at the top of the scene view to see how the objects are arranged in 3D. In all likely hood your camera is looking behind your objects. Then just drag the camera back a bit.
The solution is to set the z on your camera transform to something like -20.
D'oh, of course! Thank you, much appreciated!
Thanks also for the tip I will bear that in $$anonymous$$d.
FINALLY!!! THAN$$anonymous$$S!! the camera somehow was looking behind the objects like you said, I change the Z scale to -20 and worked perfectly.
changing it to -1 works as well; depth above 1 does not make a difference in 2D