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. Dismiss Notice

Resolved How do I make only the center of the image stretch (not any of the edges)?

Discussion in '2D' started by Janne-L, Apr 4, 2022.

  1. Janne-L

    Janne-L

    Joined:
    Mar 18, 2018
    Posts:
    12
    Hi, I'm working on some ui and made a sprite for the edges (white picture below), i however cannot figure out how i should put the borders so that the left side wouldn't stretch. (lower orange picture). I'd want it to stretch in the same way as the right side, keeping the slant constant size all times. Is this possible? if so, how could I do it?

    upload_2022-4-4_15-32-23.png
    upload_2022-4-4_15-32-18.png


    EDIT: Nevermind, I got it fixed. Basically I had to make the picture bigger, so that there was enough vertical space to properly separate the 2 parts, now it works well.
     
    Last edited: Apr 4, 2022
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,343
    If you could edit your post again to change from Help Wanted to Solved, it would be appreciated since right now there is no way of telling until you click on your post.
     
  3. Janne-L

    Janne-L

    Joined:
    Mar 18, 2018
    Posts:
    12
    Yeah, did that now. (didn't just realize to do it earlier)