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 PuneetK · Sep 16, 2013 at 05:40 PM · buttonimportimagealphapng

Unity ruins image horribly

Ok, so I decided to finally make the gui elements of my game. I imported my images for the buttons into unity. And they have been distorted horribly by Unity.

Original image: alt text

Image after importing to Unity: alt text

I read on some other threads and stuff that you have to play with the shader or something, but nowhere in the import settings is there an option for that. I can either keep it as a texture, gui, etc but no option lets me do anything any solution google has provided. I've tried all/most fixes for this, but none work even slightly.

Thanks for your time

Comment
Add comment · Show 3
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 GC1983 · Sep 16, 2013 at 05:42 PM 1
Share

Images not showing.

avatar image PuneetK · Sep 16, 2013 at 07:02 PM 0
Share

Showing fine here.

avatar image fherbst · Sep 16, 2013 at 08:16 PM 0
Share

Not showing. Image URL points to temp folder, which is probably YOUR temp folder on Unity answers.

3 Replies

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

Answer by Pickleninja · Sep 16, 2013 at 08:14 PM

I use to have problems with GUI images in unity appearing blurred, this is what I did to correct the problem.

  1. click on the image in Unity, and view it in the inspector tab

a.) change texture type to 'Advanced'

b.) set non power of 2 to 'None'

c.) check read/write enabled.

d.) set wrap mode to 'clamp'

e.) set filter mode to 'point'

f.) At the bottom, make sure that the Max Size is greater than the size of your image.

g.) Set Filter to either Automatic True Color, or RGBA 32bit

  1. Check the quality settings by going to edit -> project settings -> quality Make sure that 'Texture Quality' is set to 'full res'.

Comment
Add comment · Show 6 · 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 GC1983 · Sep 16, 2013 at 08:19 PM 0
Share

Also keep in $$anonymous$$d rhe GUI will blur if you stretch the image too large or small. It will depend on the pixel count you set it at in your design software.

avatar image PuneetK · Sep 16, 2013 at 09:02 PM 0
Share

I did exactly what you said. It's definitely better than before! But it still isn't like the original image. The original image has crisp borders, and well defined curves/ edges, where as the unity one is aliasing badly even though in my settings I've set anti aliasing to 8x

avatar image PuneetK · Sep 16, 2013 at 09:06 PM 0
Share

This is how it originally looked in Unity

alt text

This is how it looks after applying your fix:

alt text

untitled.png (9.8 kB)
playbig.png (109.3 kB)
avatar image Pickleninja · Sep 16, 2013 at 09:12 PM 0
Share

I noticed your image is 1096 x 496

Click on the image again in Unity, and go into the inspector tab.

At the bottom there is a couple of menu items. Change them to this.

$$anonymous$$ax Size: 2048 Format: RGBA 32bit

avatar image PuneetK · Sep 16, 2013 at 09:13 PM 0
Share

Did, no difference. :/

Show more comments
avatar image
0

Answer by YoungDeveloper · Sep 16, 2013 at 05:59 PM

Try this, select your gui texture in project folder, in inspector set texture type to gui, filter mode Trilinear, size (depending on your texture size), and format to truecolor.

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 PuneetK · Sep 16, 2013 at 06:07 PM 0
Share

I'm only getting two options. Texture type and filter mode. No other options.

Ok, just noticed when I click on 'gui' it gives this error in the log

 ArgumentException: $$anonymous$$ay only be called in OnPostProcessTexture
 UnityEditor.TextureImporterInspector.SizeAndFormatGUI () (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/$$anonymous$$ono/ImportSettings/TextureImporterInspector.cs:1643)
 UnityEditor.TextureImporterInspector.OnInspectorGUI () (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/$$anonymous$$ono/ImportSettings/TextureImporterInspector.cs:1158)
 UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/cac08d8a5e25d4cb/Editor/$$anonymous$$ono/Inspector/InspectorWindow.cs:888)
avatar image
0

Answer by Jeff-Rosenberg · Sep 16, 2013 at 07:27 PM

I can't see the images (it sounds like some were linked), but we're also doing our GUI for a game right now. If you're using Unity's GUI and a custom GUISkin, one of the settings for your styles is Border. This slices your texture's sprite into parts, which Unity will stretch individually (like how they have their default button) instead of stretching the texture as a whole to fill an area.

You can also set your texture in Unity to use Advanced options:

  • Non Power of 2 > None

  • Wrap Mode > Clamp

  • Filter Mode > Point (for pixely GUI) or Bilinear or Trilinear (for smoother GUI)

  • Format > Anything uncompressed or Automatic Truecolor

Comment
Add comment · Show 2 · 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 PuneetK · Sep 16, 2013 at 07:42 PM 0
Share

Somehow I'm unable to get the advanced options. Wheres the menu for that? And I'm getting an error when I try to do anything in the texture import settings. Any help?

avatar image PuneetK · Sep 16, 2013 at 08:54 PM 0
Share

Never$$anonymous$$d, found it, but still the same

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

20 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

Related Questions

Cannot set UnityUI.Image opacity when place on a UnityUI.Button 2 Answers

GUI Button using .png image? 1 Answer

Best Button for UnityGame 2D 1 Answer

Image resize and save 0 Answers

Imported image quality; changed color? 2 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