- Home /
GameObject won't appear in Game view
This is quite a noob question, but I've searched quite a lot to avoid asking it and ended with nothing, so here we go.
I'm porting my SDL game to Unity, and I'm unable to make an object appear on the game view, even with the same GameObject positioned on the Scene view.
I've tried to do the steps mentioned in these two topics: http://answers.unity3d.com/questions/904874/camera-not-displaying-any-gameobjects-in-scene.html http://answers.unity3d.com/questions/681882/game-object-is-visible-in-scene-tabbut-not-in-the.html I've changed the Z of the camera to a lower value than those of the objects, and aligned the camera to the view. Still, the objects do not show up. Here are the screenshots from the scene view while playing:
As its possible to see, the red block and the green block are not showing. I'm almost sure it has quite a simple solution, but I can't see it. Any help is very appreciated.
Answer by gerudoking · Sep 19, 2017 at 02:32 PM
I have found the problem. I had a canvas, and its rect was a lot larger than the camera's. So I was placing game objects inside the canvas rect, not in the camera one. If anyone ever come through this, check if you are placing things in the right rect!
Answer by SoulPixel · Sep 18, 2017 at 09:02 PM
Make sure to really move around with the camera. Set the camera position to 0,0,0. Then put your objects at 0,0,0 and start moving them in front of the main camera. Most of the time the camera is for example just not seeing the objects. If that still doesn't work, maybe post a screenshot of the inspector of your green object.
Tried to set to the 0,0,0 and change the coordinates of the objects and the camera, still doesn't work. Here are the images from the inspector:
The prefab objects are being instantiated in a script, but the testblock was placed directly in the editor.
Your answer
Follow this Question
Related Questions
Game object is visible in scene tab,but not in the game tab. 17 Answers
Weird shader behavior , when displacing vertices. 1 Answer
Camera properties jitter in OnSceneGUI 0 Answers
Selecting objects in scene view with left mouse button always selects child object. 1 Answer
Game and scene view camera bug 0 Answers