Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

9-spliced button scales weirdly?

Discussion in 'UGUI & TextMesh Pro' started by RandomProductYT, Feb 13, 2018.

  1. RandomProductYT

    RandomProductYT

    Joined:
    Oct 3, 2012
    Posts:
    7
    I'm trying to make a custom button sprite for my game, and I'm running into a problem with the sprite getting squished.

    This is what the base sprite looks like:


    This is what it looks like in-game:


    As you can see, the circles get vertically compressed/horizontally stretched. If I decrease the resolution of the base sprite, it doesn't get stretched, but it looks pixelated. A higher resolution looks smoother but stretched.

    Is there a good way to solve this problem?
     
  2. RandomProductYT

    RandomProductYT

    Joined:
    Oct 3, 2012
    Posts:
    7
    Solved this by changing the Pixels Per Unit in the sprite inspector to a higher number. I doubled it for my solution.