Hi! At some point in my game, I need to display some simple 2D animations which are made from several sprites (some of them quite big) that I translate/rotate/scale around the scene following a script. All the sprites are located in the resources folder.
At the moment, I’m preloading the first few sprites I need and then I load the rest in a co-routine that executes along with the animation playback so that the rest of the sprites can be ready when needed. Although this method works, the main problem I’m facing is that the application suffers a hiccup when the co-routine calls Resources.Load, which can be quite noticeable.
I’ve been searching around unity answers and, to the best of my understanding, there’s no way to invoke Resources.Load as an asynchronous function. In fact, there seems to be a request for such a feature.
I’ve also tried the approach suggested in this thead but, just like the original poster, I’m also experiencing hiccups when loading big images.
I’ve changed my coroutine approach and replaced it with threads using this handy library but, again, the hiccups are still there.
Can you suggest any way to get rid of the hiccups? Thanks in advance for your help!
Cheers,
–Nacho
Thank you for your reply. It's really unfortunate that there's no way to stream image data asynchronously! Oh well, I guess we'll have to work around that. Thanks again for your input!
– Nacho84The big problem is probably the upload to the GPU right? That and all the screwing around with writability etc.
– whydoidoitDo you anims run smoothly with AsyncLevelLoad? Mine glitch still :S
– whydoidoit