Images not showing on canvas but showing on camera

So I created a homebrew image in paint (yes I know it’s terrible and I love it) because I dont have internet access on my computer at work. The issue is no matter how I layer it in the canvas or change the z coordinates I cant make it appear via canvas placement. It only renders if I place it systematically on the camera. And I cant change the camera size to encompass the entire canvas and I cant change the canvas size to shrink it to fit the camera. How do we fix this so I dont have to use text boxes and weird shapes and I can just import directly to the canvas and make my image render there?

Camera screen is on the left, canvas on right

Hi,

Please go to the top right corner of Unity. Click on Layers and make sure “Everything” is visible.

The box on the left side in the scene window is the camera viewport. And there is a corner of the canvas box.

all layers are viewable. and I don’t think necessarily that the camera and canvas need to be the same size, I think setting the aspect ratio to 1920 x 1080 locks the canvas in that state (possibly), but like I said, even layering the image in and changing layer number (positively and negatively) isn’t seeming to do anything.

as you can see in the first image, I have it slightly overlapping the edge of the camera itself, but in the second image (super super zoomed out) it doesn’t appear at all. even if I hide everything else. am I layering things wrong or… I just have no idea. its probably a simple error on my part I just did something wrong I just have no idea what. im sorry I cant be more helpful with my information ive only started 2 days ago in unity and c#.

so update, I can actually move and resize my camera, but I don’t remember that being part of the tutorial. it COULD in theory fix the issue if I could resize it and just make it the same dimensions and placement as the canvas, but as mentioned, it wasn’t stated that we needed to do that…

it also doesn’t resize the previously placed sprites to scale to the same dimensions so they would have to be re-placed which isn’t an issue. I just want to make sure I learn how to do it the RIGHT way so that I have a good foundation on which to build from.

I would suggest to work with the canvas only. Instead of SpriteRenderer, use Image in the Canvas.

SpriteRenderer components are non-UI elements. They must be seen by a camera and may not be parented to a Canvas. That’s why the large sprite in your second screenshot does not get rendered in the game view: The camera doesn’t see it.

In your first screenshot, the big sprite overlaps the camera viewport a bit. That little part is visible in the game window whole the rest is cropped.

1 Like

AHA! yes that makes things QUITE easier. thank you so much!

to anyone else who may have this issue, you can create a new image and as long as you have the image imported into the assets file/folder and accessible, you can choose the image source and select the image you desire to be shown. it may render in a bit warped, but it seems to be easy enough to fix and then duplicate.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms