- Home /
Unity3D scene not rendering objects in Game screen
I have three objects in a scene: a grass cube, a sky cube, and a brick cube. All the objects are in the same layer, and it appears that they are correctly aligned in space to show properly. Actually, the camera preview shows them right, but then in Game mode somehow one of the cubes, the sky in this case, always shows in front and overlaps the brick.
What bothers me specially is that in the tiny Camera Preview window it's showing correctly, but then in the Game it's not.
Any idea why could this be happening?
Answer by Jessespike · Mar 18, 2015 at 09:38 PM
Double-check your materials. Seems like your sky backgound might be using a transparent material. Which may cause this, because transparent materials are rendered after opaque ones.
Internally each queue is represented by integer index;
Background is 1000,
Geometry is 2000,
AlphaTest is 2450,
Transparent is 3000
Overlay is 4000.
http://docs.unity3d.com/Manual/SL-SubshaderTags.html
You can either change the material or the renderQueue in the shader.
Answer by JigneshKoradiya · Mar 18, 2015 at 11:56 PM
assign shader to brick
that shader has
cull off;
Answer by Joelfore1 · Aug 02, 2018 at 04:01 PM
@Jessespike Thanks so much, my project actually looks good now instead of random game objects
Your answer
Follow this Question
Related Questions
Mouse click on a game object to animate the main camera. 0 Answers
Camera to follow a target within a circle? 1 Answer
Gameobject to stay within the view of the camera - c# 3 Answers
Camera rotation the same as player rotation 1 Answer
Forcing a GameObject to the highest depth (closest to camera) 2 Answers