Choose from where

If I have a hugh assetfolder, let´s say 50MB or more, and I don´t want to incorpurate it in the application.jar but instaed receive it from the server and then as time goes by, when the player request a specific asset, download it to the client, so that, the next time, it will be loaded from the client(to speed things up) . How do I achive this?

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_asset#loading_assets_from_custom_paths

But if I´ve registred both

assetManager.registerLocator(“http://MySite/MyGame/”,UrlLocator.class);

and

assetManager.registerLocator(userHome, FileLocator.class);

and do this:

grass = assetManager.loadTexture(“Textures/Terrain/splat/grass.jpg”);



How can I assure that the AssetManager load from the client and not the server?

I extend the DesktopAssetManager and do my own checking when i load.

You don’t need to do that. You can remove the ClasspathLocator and then add a UrlLocator first, since locators are searched in the order they have been added.