Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Terry-Pack · May 26, 2015 at 02:14 PM · uibuttonspritescalingslice

Scaling problem with image on buttons.

I am having some trouble with the image scaling on my wide buttons. My understanding of 9-slice sprites is that the corners don't get scaled, only the edges and center, but that is not what I am seeing. Both buttons are using the same source image, but the wider button's corners are about twice as wide as they should be:

alt text

This is what it looks like when I set the image type to simple:

alt text

I get the feeling that I am missing something, but not sure what. The sprite is 64x64 with the all borders set to 20.

endmovement-sliced.png (5.4 kB)
endmovement-simple.png (6.3 kB)
Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Thewhiteaura · May 26, 2015 at 03:14 PM 0
Share

Are you able to access the sprite editor? I had a similar problem with menu sprites a while ago, if you move the lines to the inside of where you don't want stretching to occur it should solve the problem, I learnt this from 3dbuzz. edit - don't forget to hit apply after making sure the box only includes the inside areas of your sprite, also I don't know how to add images to the comments in unity, I just drew a rough draft of what I meant.

avatar image Terry-Pack · May 28, 2015 at 07:14 AM 0
Share

Yes, the borders are set inside of where I want the cut made, I verified them to make sure. Good suggestion, but that is not it.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by ZeFirestarter · May 28, 2015 at 02:46 PM

Try modifying the Width instead of the Scale of the button. alt text

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image IronPenguin · May 17, 2016 at 01:12 PM 0
Share

Did this, and the edges of the button are still stretched.

PS: Not sure why, but my Buttons' RectTransforms are showed in inspector with Left, Right, Top and Bottom ins$$anonymous$$d of X, Y, Width and Height.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Button position scaling weird 1 Answer

Interface relative scaling 0 Answers

Is there a way to see if a sprite is sliced in code? 1 Answer

how can I change the source image on a UI button in JS code? HELP? 1 Answer

Dynamically set the sprite of a button in loop 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges