youvsvirus / youvsvirus-unity

Unity version of the you vs virus game.
GNU General Public License v3.0
1 stars 1 forks source link

White border around menu #36

Closed holke closed 4 years ago

holke commented 4 years ago

There seems to be a white boarder around the menus, which is also different in size on different systems. Here is a screenshot from @maccxs

grafik

And here a screenshot from me:

WhiteBoundary

maccxs commented 4 years ago

@holke @FredyHennig My game suddenly looks like this grafik Even after removing everything and getting the new master. HAve any ideas?

ghost commented 4 years ago

Did you resize your viewport window?

holke commented 4 years ago

After build and run or inside unity?` I cannot replicate this.

ghost commented 4 years ago

Ah, I see what's wrong. For some reason, your camera viewport has become larger than the map background. I reproduced it by setting the viewport aspect ratio to "Free Aspect" and resizing the window. Fixing the aspect ratio to e.g. 16:9 solves the problem.

In fact, that is also the reason for the white border! It also appears at certain aspect ratios. The white border comes from the Image object.

But for robustly solving the problem, I guess we should extend the MapLimits script to resize the background so that it covers the entire map....

I'm experimenting with the UI objects to remove the white border.

maccxs commented 4 years ago

Thanks, that would be great!

maccxs commented 4 years ago

At least for the website, we have to make sure that the borders are ok.

maccxs commented 4 years ago

And I don't really know how to do it ...

ghost commented 4 years ago

@maccxs I think I can solve it, but it would involve tearing and stretching the background image to viewport size. I don't want to deform the virus images, so I'd fill the screen with a monochromatic background, and put the virus images above that as an overlay. Could you give me the original virus images on a transparent background for that?

Supplement: I've cut them out myself, but the borders aren't perfect. I guess it would look better with the original pictures.