A
A
Anton Borisenko2017-02-13 15:00:14
Java
Anton Borisenko, 2017-02-13 15:00:14

How to force reload static Texture?

I am writing for an android game with libgdx in Android Studio. The playing field consists of objects represented by textures. Since a lot of objects are created, I make textures a static field in the class, in order to avoid long loading, and, in fact, unnecessary work. The game works great, but when you minimize it on the phone (exit the application) and then return to it, a strange bug occurs. Instead of textures, everything is painted black, unless, of course, they are represented by a private field. That is, at the moment of returning to the application, everything is created anew (Game, Screens, Actors, etc.). It's just that static textures don't seem to see the need for this.
Tell me why is this happening?
How to get out of the situation?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question