- Home /
Scene/Game view strange behaviour
Hey there,
I am just getting to grips with 2D development in Unity and have came accross something I do not understand.
https://www.dropbox.com/s/lt2wli75wjzde2o/Screenshot%202014-01-31%2000.14.48.png
As you can see in the above screenshot, I have 4 sprites. There are two white rectangular backgrounds, and 2 green ground blocks.
The Y/Z coordinates of those 4 items are all set to 0. The only different coordinate is (as you can imagine) the X coordinate.
So I do not understand why the game view is showing one of the ground blocks to be behind one of the white backgrounds.
Any ideas?
Answer by Ashish Dwivedi · Jan 31, 2014 at 03:57 AM
For 2D development if you are using sprite renderer then there is a property in inspector "Order In Layer". You have to set this according to what object you want in front and what in back. Lesser will be the value of "Order In Layer" that sprite will be rendered first and higher thet value of "Order In Layer" that sprite will be rendered at last. You can better understand by this scripting reference: link text
Your answer
Follow this Question
Related Questions
instantiated two characters, but they only appear in scene mode. 0 Answers
I have a main camera and another camera but in the game view i see the camera not main camera why ? 1 Answer
My game view is very blurry 2 Answers
Two camera icons in editor 2 Answers
Component on SceneView camera has wrong gameObject In OnDrawGizmos. 0 Answers