Background not visible in game view?

OK so I’ve probably done something spectacularly dumb here, but I’m struggling to see what. I was just wanting to have a bit of a play around with object placement and colour combinations, so there are no scripts or anything at this point. Literally all I have done is to drag and drop my background image into the scene (as done with the “Sky” in the 2D catch game tutorial) and create a canvas with the title text and some buttons.

As you can see, the canvas with the text and buttons is working fine in game view. The background is visible and covers the area the camera is supposedly viewing in the scene viewer, but the background isn’t showing up in the game (and if you select the camera, the camera preview is just the blank dark blue too). I haven’t changed any camera settings from what it loads up by default. Anyone able to shed a bit of light on what I’ve done wrong?

Why aren’t you using an UI panel for your background? (What you are doing ought to work, but a panel would be more appropriate for this)

2 Likes

Because, as I said, I was just wanting to try out some colour combinations first. Haven’t decided whether I want a full-width UI background or a partial one, or transparent with border, that I wouldn’t want clashing with what was behind.

And as you say, what I’m doing “should” work, but my problem is “why isn’t it?”. Using a UI panel won’t solve that problem for other parts.

This is a silly question but have you tried to move the background image on the depth? I can see that the poistion is all 0 and if you havent moved the camera it should be the same with means that the camera is " inside" the image.

Edit: I just noticed that you are using a sprite renderer and I think you need to select the texture in the project list and then go under " Texture type" and change it to " Sprite (2D and UI)

8 Likes

But it really shouldn’t be any difference if you use a background sprite or a panel. Since you’re doing UI stuff the latter seems more reasonable…

1 Like

Thank you! That fixed it :slight_smile:

2 Likes

You’re welcome :slight_smile:

I have a Similar issue but nothing shows up on my game screen

Please help me I am halfway through a course and I am still powering on but I cannot test the functions as I go through. plus will need to work once it is finished

Try moving your camera on the x-axis until you can see your scene.

For future reference, please create your own new thread. This one is over 2 years old.

Something so simple! Beginner here and this comment made me feel stupid but also helped! Thank you :slight_smile:

just change the position of z to negative like z=-10. Then bring the camera to the center of the background image, you will get the background image.