Register locator zip internal file

Example
assetManager.registerLocator(“town.zip”, ZipLocator.class);

It works if town zip in project directory.

if i build project:

  1. project build without level archive
  2. if i place level archive to game directory - level not load

how to load zip file from scene folder?

If i copy zip archive to folder /Scene/

registerLocator() needs the location of the file. If the file is in a different place than “the current directory” then you will need to specify it.

for example?
this: assetManager.registerLocator(“town.zip”, ZipLocator.class);
load if archive located in project folder

if i place archive in /Models/town.zip
?

assetManager.registerLocator(“town.zip”, ZipLocator.class);
sceneModel = assetManager.loadModel(“town.scene”);

Obviously

assetManager.registerLocator ( "Models/town.zip ", ZipLocator.class);

com.jme3.asset.AssetLoadException: Failed to open zip file: Models/factory.zip

assetManager.registerLocator("Models/" + levelName + ".zip", ZipLocator.class);
sceneModel = assetManager.loadModel(levelName+".scene");

The model name is not the name of the archive. Why look for adventure with this approach?

I export model to ogre. and have 17 files. I zip files to archive, example:
https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_collision.html

Convert to j3o?

How does this relate to the current thread?

I have level model with texture.

If i convert model to j3o model load without texture.

I see sample hello collision.

Convert model to ogre and zip archive.

This code:
assetManager.registerLocator(“town.zip”, ZipLocator.class);
sceneModel = assetManager.loadModel(“town.scene”);

if zip archive located at project path.
if i build project or replace archive model in archive not load.

Read attentively.

https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_asset.html#loading-models-and-scenes

Thanks i unzip archive and load ogre files

Can you help test client chat? give your skype please If you have time