Saving and Loading

Hey ,

Ive read the tutorial :
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:save_and_load

There are several things i dont understand.

  1. If i save the rootNode , does all the nodes ive attached to it as children are saved? or only spacials attched to the rootNode?
  2. When i load back the model ive saved(Say rootNode) , are all the nodes appear with their original names?original order?
  3. It is shown how to save nodes, but how can i save a custom class ? where is it saved to ? the example on the tutorial doesnt show that ( It only shows read/write methods)

Thank you for your help :slight_smile:

I’ve never done this but I will take random stabs in the dark:
1 - Should recursively go through all children and save them
2 - Original names yes. Order, I would assume so
3 - Custom classes must implement Savable, and then associate them with controls or userdata

but you should be able to test all of this :slight_smile:

you can look up the saveable interface in jme, it can save everything that implements saveable, so nodes mesh geometrymaterial ect.

thank you for your answers !
I will this of course , but i wanted to understand what to expect before doing so .