- Home /
Control UI Panel Border Size
Hi there,
I'm having trouble with the border size of UI panels. Below is an image of two panels next to each other. The one on the left is my panel, on the right is the default one produced by selecting GameObject->UI->Panel. The only difference between the two is that on mine I've set my own source image. I've also unselected "Fill Center" on both to show that, for some reason, the borders on my panel are about twice the size of the default one.
The border is also much blurrier on mine than the default one. These two things are what I'm trying to get to the bottom of.
I've tried to make sure the settings on each panel match as well as possible both are 32x32 images with the same borders set up the same. I don't see what else could effect the border sizes. Conceivably the blurring could be coming from my import settings on my texture which is why I included them in this image. Any suggestions would be welcome.
Try uncheck "generate $$anonymous$$ip $$anonymous$$aps" and use True Color format?
Answer by Xcone · May 24, 2017 at 07:38 AM
I realise this is an old question. But I had the same problem and was hoping for an answer here. I figured it out in the meantime. So I'm just posting this here for the ppl after me.
In your sprite texture, you need toy around with the "Pixels Per Unit" value. Higher values make your border thinner / more compact / less blurry. In your screenshot it has the value '100'. You should it increase it to 200 or 300 for a similar border thickness as the Unity panel border.
Your answer
![](https://koobas.hobune.stream/wayback/20220613185504im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity imports texture problem 1 Answer
How to hide UI canvas between scenes,UI Panel staying visible between scenes 1 Answer
Texture mipmap distance 1 Answer
Terrain Texture Problem 0 Answers