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 Ruffian0305 · Apr 07, 2015 at 09:51 AM · spriteimage4.6blurry

Sprite Becoming Blurry

Hello, I know this gets asked quite a bit, but I still have not been able to find a solution to this problem.

I have a sprite (not a power of 2). Using the 4.6 Image, I add the sprite to the image and it looks great: alt text

In my script, I am messing with these images to create a pseudo-inventory system. However, when I switch the sprite back to the SAME image, the image becomes blurry (The top two images on the left):

alt text

I have tried setting the sprite as generate mip maps vs not generate mip maps, filter mode point vs bi-linear, format true colour vs 16 bit vs compressed, none of it is happening. No matter what combination of those three settings I use, the image is still blurry when swapped out via code.

The image is 1024 x 1024 so it is a power of 2, the max size is set to 1024.

I am at a loss for how to solve this problem.

The code I am using to swap the image is a simple image.sprite = (sprite loaded from resource)

 public void AddItem(int itemID)
     {
         if(inventoryItem[itemID] != null)
         {
             Debug.Log ("Item exists!");
 
             for(int i = 0; i < inventoryOpen.Length; i++)
             {
                 if(inventoryOpen[i] == true)
                 {
                     inventoryOpen[i] = false;
                     inventorySlots[i].sprite = inventoryImages[itemID];
                     inventoryItem[i] = itemID;
                     Debug.Log ("Added item! Slot: " + i + " Slot Name? " + inventorySlots[i].name + " Item ID: " + itemID);
                     break;
                 }
             }
         }
     }


I really appreciate any help or thoughts anyone has on this problem.

untitled.png (259.0 kB)
untitled.png (233.5 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 _Gkxd · Apr 07, 2015 at 01:31 PM 0
Share

Switching to point mode definitely causes pixels to be sharper. I'm not sure exactly where your problem is (which sprite are you talking about?), but that seems to be the most likely cause of your problem.

avatar image Ruffian0305 · Apr 09, 2015 at 05:39 AM 0
Share

The sprites that are beco$$anonymous$$g blurry are the ones that are individual items slots. Each of those slots are individual sprites. I did try point mode, but that didn't help at all. It is a 50/50 problem when put on other computers, so I think it really is just unity being odd.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by SirBoboHobo · Apr 07, 2015 at 12:15 PM

-Make sure your image max size when you import it is big enough -Try changing filter modes -Untick Generate Mip Maps -Change the Texture Type to Advanced and change some properties until you get the result you want -lots of time this happens to me too, after re-importing a few times it looks okay.

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 Ruffian0305 · Apr 09, 2015 at 05:37 AM 0
Share

Switching around through all of the settings still hasn't fixed the problem on my personal computer, however its 50/50 with it happening on another computer. I think I'm just going to chalk this one up to weirdness?

avatar image
0

Answer by mathcuber · Apr 11, 2017 at 07:19 AM

I had the same issue in my game. I'm not sure why everyone is saying to not use generate mip maps, but clicking it helped the resolution a lot. I also checked tri-linear.

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

6 People are following this question.

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

Related Questions

Unity 4.6: How to fit center byte array png in the Image UI? 1 Answer

Blurry sprite in unity 1 Answer

Sprite's blurrinness change with size of camera 0 Answers

How to make smaller sprites not blurry? 4 Answers

GIT seems to be losing some scene data 1 Answer


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