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
1
Question by unitynewbie1 · Jun 14, 2012 at 10:06 PM · guibutton

How to preserve image quality when putting image on a cube for buttons

I'm using buttons made out of a thin cube with a picture on it. I'm using this instead of onGUI to improve game performance. However, when I put the icons (pngs) on the cubes, they look distorted. The edges look ragged and the whole image looks muffled. I already checked that it wasn't because the picture was too small or big for the cube. It also doesn't help to adjust the camera distance. Could you please advise on how to make a picture on a button look as much like the original picture when it's in unity?

Here's an example:

original picturealt text

picture on a unity cube (you can ignore the black background):alt text

iChat Image(383281963).png (15.5 kB)
Info.png (24.6 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 Mizuho · Jun 14, 2012 at 10:09 PM 3
Share

I don't think that OnGUI() is nearly enough of a killer on performance that you'd not want this in the GUI, but I would assume that your image is in fact too large to fit on the cube 1 to 1. You may notice large performance issues with getting this picture on the GUI if you were to do something like Resources.Load within the OnGUI() function.

avatar image unitynewbie1 · Jun 15, 2012 at 06:30 AM 0
Share

I forgot to mention that I was concerned about performance because I'm building for the iphone and I want to do mul$$anonymous$$ch. Thank you for the advice on the image again--the "truecolor" change that jspease recommended has worked best

1 Reply

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

Answer by jspease · Jun 15, 2012 at 06:09 AM

Try doing both of these:

  1. Change the Texture Type from "Texture" to "GUI" in the texture settings of the Info texture.

  2. Change the Format from "Compressed" to "Truecolor" in the texture settings of the Info texture.

Also, I'd use a 4-vertex plane instead of a cube if I were you.

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

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

GUI.Label positioning for many device resolutions 1 Answer

GUI, making main page lead into an instructions page 2 Answers

How to get Rect from scene Button ? 1 Answer

Unity 5 GUI system 1 Answer

GUI button doesn't appear on Android 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