Hey Guys!

I have tried getting a particle effect I have created in the reneditor, to load into my game.  It works, very well too :).  Tho once I have deployed it the texture file I used won't load, I understand why not, paths are all different once in a jar etc.

So, how do I load a .jme particle effect made in reneditor and then load it, with relative texture path?



how do you load the file exactly?

Make sure to use the ResourceLocator.

try {
           InputStream j = Test.class.getClassLoader()
            Spatial obj = (Spatial) BinaryImporter.getInstance().load(j);
            if (obj instanceof Node) {
                Node jet = (Node) obj;
                for (int ii = jet.getQuantity() - 1; ii >= 0; ii--) {
                    if (!(jet.getChild(ii) instanceof ParticleGeometry)) {
                if (jet.getQuantity() == 0) {
                    throw new Exception("Node contains no particle meshes");
        }catch(Exception e){

try to set up the ResourceLocator to point to your texture directory.

-> example