[SOLVED] jme2 – Saving and loading scene, texture

Hello, I’m currently trying to save and load my scene. Everything else seems to work fine, except for texture in texturestate which doesn’t seem to be saved or loaded? I’m sure, I must be missing something here. I haven’t been able to find a fix for this issue, so I wonder what I have missed here?

Here is the code

[java]//Save and load

try {

if(evt.getTriggerIndex() == 65) {


BinaryExporter.getInstance().save(worldScene, new File(“world1.scene”));

} else if(evt.getTriggerIndex() == 67) {



rootNode.updateGeometricState(0, false);


Node loadedNode = (Node) BinaryImporter.getInstance().load(new File(“world1.scene”));

ArrayList<Spatial> allspat = new ArrayList<Spatial>();


for(Spatial s : allspat) {



rootNode.updateGeometricState(0, false);



} catch (Exception e) {



From what I remember textures are not saved completely, only the name to the file. Have a look at Texture.DEFAULT_STORE_TEXTURE which normally ist set to false… because textures are normally present in a resource package and reused, you would not want to save them out…

Well setting t.setStoreTexture(true) fixed it, Thank you…

But I guess thats not the correct way of doing it, so I will be looking into other solutions…