weird 9 slice behavior

I’ve been trying to 9 slice a button and no matter what I move the borders to I get really weird results. I’m testing in a new scene with a screen overlay canvas and no transform changes on the canvas or the image.

Not that it should make a difference but I centered the button within the canvas and still poor results. Obvious scaling on edges when no scaling should happen. I’m on unity 5.5.1

I tried going to 5.6 beta and still same behavior. Here is a blank project with a test scene showing odd behavior

3011757–224708–9 slice test.zip (893 KB)

Hello,

I am not sure if it will work the same for you but here’s what I’ve done:

  • Reset Sprite Import Settings for the Button
  • Set Sprite Mode = Single, Pixels Per Unit = 1, Mesh Type = Full Rect (thou it worked fine with Tight), Filter Mode = Bilinear, Max Size = 2048 (no overrides). And removed Advanced » Generate Mip Map
  • On the Scene, reseted the Image, changed Source Image back to Button, Image Type = Sliced and Fill Center checked.
  • Reset Canvas, changed Canvas Scaler to Scale With Screen Size at 1920x1080 and Reference Pixels Per Unit = 1.

I also added an Aspect Ratio Fitter script to the Button to play around but I think it works well without it. I also made some changes because the borders were to strong for me (the Reference Pixel Per Unit). But at 100, it just looks wider.

You can see the screenshot I took.
Hope it helps somehow.

Kind regards,
Pedro