nnpa
1
Example
assetManager.registerLocator(“town.zip”, ZipLocator.class);
It works if town zip in project directory.
if i build project:
- project build without level archive
- 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/
pspeed
2
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.
nnpa
4
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”);
AdiDOS
5
Obviously
assetManager.registerLocator ( "Models/town.zip ", ZipLocator.class);
nnpa
6
com.jme3.asset.AssetLoadException: Failed to open zip file: Models/factory.zip
assetManager.registerLocator("Models/" + levelName + ".zip", ZipLocator.class);
sceneModel = assetManager.loadModel(levelName+".scene");
AdiDOS
7
The model name is not the name of the archive. Why look for adventure with this approach?
nnpa
8
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?
AdiDOS
9
How does this relate to the current thread?
nnpa
10
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.
AdiDOS
11
nnpa
12
Thanks i unzip archive and load ogre files
Can you help test client chat? give your skype please If you have time