- Home /
Sprite becomes Invisble in game mode / window
Hello Devs ,
I am following a small tutorial to create a Ping-pong game. I'd set background image properly on beneath layer but when I am trying to set a Sprite over a background Texture it is not showing on game window.
I searched through alot and also folllowed this link :
to create a separate sorting layer for my paddle sprite. Plus I'd try to adjust camera position , order in layer option and try'n enabling / disabling default layer option from top right corner drop-down menu. But nothing works for me.
The properties of Paddle and image is :
and properties of Background layer is look like this :
Edit : Please see attached code here : One drive uploaded code
Please help in rectify this problem.
Regards.
Answer by Deadcow_ · Apr 05, 2015 at 07:33 PM
You said you tried to adjust camera position, but it seems that if you set camera Z position to -1 it'll solve the problem...
To be clear, sorting layer and sorting order is needed to deter$$anonymous$$e the order to draw sprites, but them need to be in a front of a camera in any case
Thanks dude !! I am geek in unity ga$$anonymous$$g. One short quest. : Since i am using 2d sprites n textures , then why camera z position = -1 is needed ?
Oh, yeah, you can keep your camera at zeros. The camera default near clipping plane is 0.3 for some reason. Just set near to 0 and it'll render your sprites posed at Z=0+
Your answer
