Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 jediah_hutch · May 21, 2019 at 01:09 AM · errorwebrequestcachingtexure

Red 8x8 Question mark texture global replacement

Hello! There are numerous questions covering this, none with a great answer that I've seen.

I'm building an app heavily reliant on live images from the web, and a caching plugin called unicache. We have had some corrupt files from the backend, and very rare errors with the caching plugin that result in an 8x8 texture being displayed which is a red question mark.

Many of the community answers rely on fixing the underlying problem. We're at a place where that seems to have been solved, but is there a solid way to globally just replace that question mark texture with something more professional?

Comment
Add comment
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

1 Reply

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

Answer by Bunny83 · May 21, 2019 at 02:00 AM

I'm not quite sure what you're asking. However if you just need a way to detect a corrupted / non existant image, check out this question

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 jediah_hutch · May 21, 2019 at 05:26 PM 0
Share

So when you look at that question, it is aware of the red question mark I'm talking about. In that example, the solution was downloading the red question mark, then replacing it if it gets assigned to a texture. Is there a cleaner way to solve this, which would be actually replace that red question mark so that in any case, it never would appear?

avatar image Bunny83 jediah_hutch · May 21, 2019 at 05:47 PM 0
Share

No, there's no other way as Unity doesn't communicate any kind of failure to you besides returning that question mark texture. So when loading an image you just have to check if the returned image is that question mark texture and if it's the case return the texture you want. They could have returned a null value ins$$anonymous$$d. However that would require anyone loading images dynamically to handle failure cases. So they simply return that question mark texture ins$$anonymous$$d to avoid any errors. If you want to handle the failure cases the amount of work you have to do is pretty much the same except that you first need to have the reference to the failure texture in order to deter$$anonymous$$e if it was successful or not.

avatar image jediah_hutch Bunny83 · May 21, 2019 at 06:03 PM 0
Share

yikes! would be ideal to have a failure event and replace with our own, it feels like an odd solution to have to compare the bytes

Show more comments

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

138 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 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 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 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 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

About Implemented host name resolution with IPv6 in Unity 4.6.9 release-notes. 0 Answers

UnityWebRequests constantly fail with 'SSL CA certificate error' on the HoloLens 2 device (UWP build) when accessing API hosted on Azure 1 Answer

UnityWebRequest.POST calls to an HTTPS url throws "Unknown error" on specific device 0 Answers

TextureImporter problem,can't preview high verion psd 0 Answers

Unexcpected Token error with transform.find 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