CyberDude Posted April 11, 2019 Share Posted April 11, 2019 In my web application (mobile platform) i have heavy assets, aprox 15mb. I there any way to load SD MD HD assets together and update textures of elements with time? Like, we loaded SD -> use SD but load others too. Okay, MD is ready, change SD to MD. Atleast, HD is ready so use it! Thanks for you help!) Quote Link to comment Share on other sites More sharing options...
botmaster Posted April 16, 2019 Share Posted April 16, 2019 I do this in my apps but this is not a simple piece of code, I do have an extensive asset manager that handles that directly, here's how it works: 1. assets can have resolution from 0.25 to 3. 2. target resolution (typically 1 or 2) is set globally but can be set by code for a specific asset. 3. if only one resolution is available for that asset the assetmanager loads that one. 4. If multiple resolutions are available for that asset, the assetmanager checks if there's any resolution smaller than the target resolution. 5. If smaller resolutions are available, the assetmanaget starts loading the smallest one > when loaded > update the Sprite and starts loading the next resolution > etc .. until reaching the target resolution. after each resolution load, the previous one is disposed and cleaned, the new resolution asset updates the Sprite and scale values. In addition there's a cache system that skips all that if target resolution is already available. Like I said this cannot be done with a simple piece of code, this is an extensive system. Quote Link to comment Share on other sites More sharing options...
CyberDude Posted April 16, 2019 Author Share Posted April 16, 2019 Not all responses migrated from old server Anyway, thanks for your answers. I already noticed, that my request is not so simple as i think. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.