I want to make a simple button in unity with an image. The image is a 800x800 png and looks fine when i open it in any image viewer. When i place the image in a asset folder and add it to my button however, it looks awful! It is supposed to look like this:
Instead it turns out like this:
Here is the inspection menu for the image:
Any help would be wonderful!
Setting the Filter Mode to Point should fix this
If the above method doesn't work, try tweaking Max Size and set Compression to None
Related
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://imgur.com/a/nhJN3Ko
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?
compare the settings of the sourcefile of each project. it looks like the image sourcefiles are using different values for "Pixels Per Unit".
When I try to assign a source image to a Unity.UI button it always ends up blurry/distorted on the edges. I played with the resolution and some settings also tried with other images but it doesn't make a difference. the images I tried were png files and had transparent backgrounds.
By default, Unity applies a bilinear filter to textures that blur them slightly. This is often good if you have a high-resolution image since it removes hard edges. However, if you have a low-resolution image (e.g. pixel art) you might not want this. To disable it, click on the image in the project tab and change Filter Mode to Point (no filter) in the inspector.
This is how an image can look with the Bilinear filter mode:
Compared to how it looks with the Point filter mode:
I basically want to make overlays like you know them from the package explorer in eclipse, a base image, and a smaller picture laid above in the bottom right corner. I used DecorationOverlayIcon for this and fist some pics from the already existing resources just to if it works. It the overlays showed up, but even though I had given the following instructions
imageDescriptorArray[IDecoration.BOTTOM_RIGHT] = alreadyExistingImageDescriptor;
DecorationOverlayIcon(baseImage, overlaysArray);
the overlayed image was very big. Than I made my icon, which is a 16x16 .png. It like the other pictures covers up the icon almost completely. How do I make the image smaller, do I have to convert it to a smaller size like 8x8 for that, or alternatively, how do I push it further down?
DecorationOverlayIcon doesn't resize anything so you must provide small images for the overlays.
There is also no way to change the calculated position of the overlays.
My button in photoshop looks like this:
But when I import in in my game it turns out like this:
Hopefully you can see the upper and right border has been chopped! It's a button from the new UI stuff in 4.6, and no matter I set the "Image type" to (Simple, Sliced, Tiled, Filled) and no matter setting I cant get it to show the whole image! It also does not look sharp as the photoshop image too... any clues?
This can happen if your texture is a size that is not a power of 2.
For example, make your image 256 * 128.
I am searching for a tool on web but didnt got any success their at all. I want to have something like upload and preview the image as background as repeated one or any other alternative...
I have this sample:
How can I preview and cut the image as a perfect background image as repeated one. Is it possible in Photoshop or in some similiar products?
The trick i have recovered is crop a part of the image in a big canvas of Photoshop and then making the deuplicate copies of the layers...
If the image seems like irregular it means the cropped image is wrong so you have to change with a other or larger part of the image...
If it is regular and doesn't cut at the side onto the edge, it means image is perfect making background repeated...
Thanks...