Skip to main content
7 events
when toggle format what by license comment
Oct 12, 2023 at 1:32 comment added Kevin Okay, fair enough. I'm glad we had this discussion, because it prompted me to re-read the question and notice that the OP is downloading the image before checking if it's already cached on the device...
Oct 12, 2023 at 1:24 comment added DMGregory That's covered in your answer though, so I see no need to try to duplicate/compete with it. Just to offer this trick of caching, keeping track of, and following up on outstanding texture display attempts, which was not covered thus far that I could see.
Oct 12, 2023 at 1:22 comment added Kevin Since the context of the OP's question suggests that they do not fully understand asynchronous loading, they're likely still going to struggle with that part.
Oct 12, 2023 at 1:18 comment added Kevin "I have not tailored this for your use case" does not have the same meaning to me as "this script references another script NetworkManager which is not included in this answer." I understand, but keep in mind that many of our users are inexperienced and will be confused when they (inevitably) paste your code into a script and then get an error message. One additional sentence of clarification (e.g. a comment above the call to NetworkManager) would help alleviate confusion.
Oct 12, 2023 at 0:36 comment added DMGregory Here is the note I included about that: "I had to solve something similar a while back, so here's the code I wrote for that case. I have not tailored this for your use case, so take this as an example only:" From the function signature one can infer that it loads the texture at the provided path asynchronously, then calls the provided callback, so it's straightforward to map that to one's own code performing similar functions.
Oct 12, 2023 at 0:23 comment added Kevin Your code references a NetworkManager that isn't a built-in Unity class AFAIK; it might be helpful to add a note about that.
Oct 11, 2023 at 1:00 history answered DMGregory CC BY-SA 4.0