Here is what i’m trying to create:
Load list of configurations and resources xml files from <assets>/Xml/resources.xml. Then load the data from the files described therein
Also there is no hint about the need of closing InputStream from assetInfo. Whether to close the InputStream after reading the xml file ?
The Search gives only results about loading models from xml
@Empire Phoenix said:
Why do you care? for most of all usecases just lading the xml from an inputstream will do. If its very slow try with a bufferd wrapped around.
I would close it. As you opendend it, it should be your responsibility.
that’s not the answer.
If short, the question is: how to load custom xml file using AssetManager ? Please provide some example.
That’s right. And then when you want to load the asset, you invoke com.jme3.asset.AssetManager.loadAsset(assetPath); and cast the result to a Document,
like I do in line 572 of Assets.java.