Now suppose these are two new models i released them as an update to clients. So these models are not exist in my clients version yet.
I want clients be able to use these new models in their game by just downloading them from server and adding them inside lib folder of their game dynamically without needing to rebuild client code.
How can i achieve this ? Can we register them dynamically using assetManager.registerLocator ?
If you just want to load assets into your game from more locations than just the default assets.jar, then registering asset locators will work.
Edit: I should probably be a little more detailed, so here’s what I did in one of my projects. I wanted to load and compile a bunch of Groovy scripts at runtime from a folder inside the project’s installation directory. I wound up using the AssetManager to do this, and all it required was registering a FileLocator with the root path set to my script folder and creating my own AssetLoader to load and compile the Groovy scripts. The AssetLocator/AssetLoader pattern is quite powerful and you can get some pretty advanced functionality without doing a lot of extra work (i.e., loading assets from the internet - see the TestUrlLoading demo).
But if you built your project to run locally with those separate projects then those jars are already in the classpath. We don’t know how you actually deploy your application but presumably it’s expanded somehow and those jars are on disk.
Then your next question will be “How do I replace those jars when they change?”
…then we’ll be back to getdown and you start all over with new questions.