0

I added a Unity UI>Image to my project with a given source image (called Btn_OtherButton_Blue). It appears cropped in some way. It doesn't show the full button image, the top seems cut off. I added a UI>Image to a different project with the same source image and it appears differently. In that project it seems like it's using the full image uncropped.

I've compared the projects and can not find the difference. I'm new to Unity. There's probably something simple I'm missing. I have an imgur link to show what I mean.

https://i.stack.imgur.com/Y2C8u.jpg

The settings seem the same to me. Is there a crop property of UI>Image that's hidden that could determine why one project shows more of the source image than the other?

user2012741
  • 89
  • 1
  • 8

1 Answers1

1

compare the settings of the sourcefile of each project. it looks like the image sourcefiles are using different values for "Pixels Per Unit".

  • Thank you so much for trying to help. I checked the source file settings and added a new image to the imgur link that compares them. They still seem the same to me. They both have a Pixels Per Unit of 100. :( – user2012741 Jul 17 '22 at 01:41
  • OMG I changed the Pixels per unit on the one that doesn't show the full image to 10 and now it shows the full image! I don't understand why one project needs it to be 100 to show the full image and the other needs it to be 10 but thank you so much! I never would have figured this out without you! – user2012741 Jul 17 '22 at 01:43
  • check also the Canvas GameObject. are there different values for "Canvas Scaler > Reference Pixels Per Unit"? if this is not the case i recognized that you are using preview packages in one project. maybe the package (UI-Builder?) has something to do with it. – andreasguertler Jul 17 '22 at 02:32