I have a
HexGame class extending
Game and various
Screens that receive the game object in their constructor. I was thinking of having one
AssetManager in the game class and using it to load the necessary assets in each screen's constructor and unload them in the screen's dispose method.
The alternative would be to use a new AssetManager in every screen. What would be best practice?
I have a
I would suggest using a single AssetManager, unless your assets are so large that memory would be a problem.
Again, depending on your size, you may also want to just load all assets up front. You would probably prefer to not load and unload assets during game play if it can be avoided. This will make screen transitions quicker/smoother.
One reason though to use multiple AssetManagers is if you're loading from different locations. As an example, for my last LibGDX project, I was loading a small number of included assets locally, but also loading assets from AWS S3, with some local caching. So I had two AssetManagers to handle those cases.