Rick
Rick

Reputation: 363

Why does my image always appear behind another image in Unity?

I just started Unity (following a course from Udemy). I've run into this issue where any object/image I add is always added behind my background...

I'm not sure how to fix it so the spaceship (seen extending past the background) is in-front of the background...

I've tried playing with the layers, but that didn't work...

https://i.imgur.com/epUswrD.png

Upvotes: 1

Views: 2887

Answers (2)

Anamta Khan
Anamta Khan

Reputation: 15

z value of position and hierarchy position both can be the issue. Also you can give it sortingLayer :)

Upvotes: 0

Rick
Rick

Reputation: 363

It was because my Galaxy had a z index... So the camera was placed in between the the player and galaxy. Setting the z to 0 fixed it.

Upvotes: 1

Related Questions