Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Recovering from a load error


PaWeR
 Share

Recommended Posts

Hello,

 

I'm developing a game where some assets are chosen depending on the locale. For instance I have to choose between ./assests/en/mainTitle.png and ./assests/es/mainTitle.png.

 

But as I cannot ensure all the locales are available, if a file is not found (for example we don't support chinese for now), it should fallback to english, so I need to try to check if a file exists and if not, then load the english version.

 

My first try was using onFileError to add another URL for the missing file, but the onLoadComplete was launched when the load of the  original collection of assets ended, so this new entry was ignored.

Then I tried to flag the error and start the load again if it ended with a missing file, but it does not work.

 

Is there a proper way to accomplish this functionality?

 
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...