• 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 determine 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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

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

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

Error CS0029 1 Answer

Error CS1525: Unexpected Symbol `int' 0 Answers

Cannot add or drag an asset to the inspector 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges