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 Luiz_Thiago · Jan 12, 2015 at 01:44 PM · uigui

9-sliced image in the UI 4.6 not working as expected...

Hello guys...

I'm needing help for images and buttons, using SLICED type.

Even making the cut (9-slice) in the picture, when I use the image in the GUI, I have to use a huge scale and a minuscule size, to the image borders appear. If I leave the scale 1:1, the borders are so small, that do not appear.

Some help??? =D

Left with scale, right without scale ...

alt text

alt text

captura de tela 2015-01-12 11.41.11.png (134.6 kB)
captura de tela 2015-01-12 11.43.33.png (112.8 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 SnStarr · Jan 12, 2015 at 01:50 PM 0
Share

Interesting. Just curious why you 9-sliced a single UI image. You tried not slicing it all?

avatar image Luiz_Thiago · Jan 12, 2015 at 02:05 PM 0
Share

Its not a single image...

alt text

captura de tela 2015-01-12 12.05.13.png (138.5 kB)

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Luiz_Thiago · Jan 12, 2015 at 03:02 PM

Ok...

I managed to solve my problem by adding the "Canvas Scaler" component in my Canvas, and changing the value of the "Reference Pixels Per Unit" property.

alt text


captura de tela 2015-01-12 12.59.15.png (55.6 kB)
Comment
Add comment · 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
0

Answer by Mmmpies · Jan 12, 2015 at 02:35 PM

That's how 9 slicing works, it takes the view that the center of the image is scale-able but the edges need to be kept at the original size.

If you want the edges to scale as well then switch off 9 slicing. Other than that you'll have to create the Image as pretty much all edge with only a minimum center that can stretch out to whatever size but you'll still get fairly large buttons to start with.

EDIT:

Well the best advice is make the center of the image tiny, as you have 2 colors make it 2 pixels wide and 2 high so you can get the darker color below the lighter one. Make the rest of your image all corners. At least that way you minimize the original image size.

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 Luiz_Thiago · Jan 12, 2015 at 02:45 PM 0
Share

I do not want to scale the borders together. I just want them to be in an acceptable size, not "2 pixels" wide. As it appears in the tutorial video's own Unity... =(

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

28 People are following this question.

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

Related Questions

GUI off-screen right side 0 Answers

How to detect click outside UI panel 9 Answers

UI Mask only working in Scene window. 1 Answer

when switching scenes, old GUI remains on screen 1 Answer

Determining if Horizontal Layout Group has room for an element. 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