Closed Jacowaco closed 8 years ago
This is for Starling 1.8.x
This warning is actually there to protect you; on some platforms, instead of having a black texture, the game will crash altogether otherwise. Which is normally non-recoverable. ;-)
However, the AssetManager actually attempts to automatically avoid any uploads while the application is in the background. Are you using the default AssetManager, or do you have any extensions / modifications in place? And does this happen for all kinds of textures, or just a specific type?
I'm using the famous "assets.loadQueue(function onProgress(ratio:Number):void" function. The bug happens in Desktop, i haven't tried this bug in mobile devices. It happens to all the textures i have. The only ones i can continue to see are those i had loaded before from embedded assets which my asset manager doesn't control.
Okay, I had another look at the code in question, and that's a specific workaround for a problem that was only reported on mobile. Thus, I'm now limiting it to that.
Please let me know if that fixes your problem.
Yes! It fixed the problem! Thanks!
Perfect, thanks for trying it out!
Hi, in the ConcreteTexture's uploadBitmapData() function, there is this:
if (!Starling.current.isRendering) { trace("[Starling] Warning: uploading bitmap data while Starling is not rendering " + "may cause a crash on some platforms. Ignoring request."); return; }
If my game is opened and get minimized while the AssetManager is loading the textures, the game gets all black and only way you can play it is by closing it and opening it again. When i removed the "return;" the game loads the assets fine, even if minimized. I think this is important.