Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I started using the asset manager, so I could use a loading screen. Everything is working fine, but when the app enters a pause state, it unloads every asset and when it loads the screen all the assets are gone. I debugged and I found that they are waiting to be loaded again, I commit an update to do it but nothing happened.

Am I missing something? (In the pause method, I don't unload anything)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Most resources (like Texture, if its loaded from file) in libGDX are managed resources. If you load such resource using AssetManager, it takes care of it to be reloaded on resume, but you have to instruct your AssetManager to actually reload your resources. All you need to do is constantly call update() on resume until this method returns true, which indicates fully-loaded assets; or you can call finishLoading() to block you app till everything is loaded. You should read entry about libGDX architecture to get broader knowledge on how this framework works.

You may also find this link helpful.

share|improve this answer
    
Well, I resolved my problem :) you mentioned something that i was´nt doing in my resume, call the update method of the asset manager until everything loaded :) my first update is in the render so it is called everytime :) thanks for that key words :P –  Rudy_TM Jun 20 '12 at 15:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.