Hi,
this should be rather simple. But I think I’m doing something wrong now. I save and load a savable like this:
@Override
public void write(JmeExporter ex) throws IOException {
OutputCapsule out = ex.getCapsule(this);
out.writeSavableArrayList((ArrayList) entries, "entries", null);
}
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule in = im.getCapsule(this);
in.readSavableArrayList("entries", null);
}
Whereas the entries field is:
private List<CameraSweepDataEntry> entries;
CameraSweepDataEntry implements Savable. And as far as I read the files with an hex editor. I can see the data there. But when I load them, the entries get null. I don’t know what is wrong…
The loading is initialized by a:
public class CameraSweepDataLoader implements AssetLoader {
public static final String CAMERA_SWEEP_DATA_FILE_EXTENSION = "csd";
@Override
public Object load(AssetInfo assetInfo) throws IOException {
BinaryImporter importer = BinaryImporter.getInstance();
return importer.load(assetInfo);
}