- Home /
Quad appearing behind all other objects
I have a 3D quad meant to play a video in my 2D game, the video appears behind all other objects
I've tried setting the z value to -1 but it didn't help. The quad outline is above other objects so I suspect the texture is the problem but don't see any options to change layer order.
Any ideas?
Answer by MichaI · Sep 28, 2019 at 11:53 AM
Check if z position value of your quad is not greater than your sprites. You can set it to some value between z position of your sprites and z position of your camera (for example -1). You can also switch to 3d view in your scene view to see if your quad is in front of your sprites.
Also if you are using custom shader make sure that ZWrite is On in it.
Changing z position positive or negative doesn't help unfortunately.
It's definitely a shader issue. I can see in 3D space the object is above the rest of the scene, only the shader is disappearing
I'm using the Sprites/Default shader, any idea how to change ZWrite?
Sprites/Default shader should write to z buffer, so I don't quite understand why you getting such results. But you can try changing RenderQueue in your quad $$anonymous$$aterial to Transparent, or try changing your quad's material shader.
Your answer
Follow this Question
Related Questions
How do I play a full screen video? 4 Answers
Animated GIF and Audio Instead of Video? 3 Answers
Any possibility to play a video in unity free? 7 Answers
alpha keying after rendering for tv interaction 3 Answers
video and sound at the same time 0 Answers