Noobish question

Hi all, Im still learning my way around JMonkey and Java. I’m just wondering how I can load a scene that I created in SceneComposer in my Simple application. The following code:



public class CustomTerrain extends SimpleApplication{



public static void main (String args[]){

CustomTerrain app = new CustomTerrain();

app.start();

}



public void simpleInitApp(){



Spatial scene = assetManager.loadModel("/Scenes/testScene2.j3o");

rootNode.attachChild(scene);



}



gives me an error ( I got the code from the HelloTerrain tutorial)



here is the error:



SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Terrain/TerrainLighting.frag, defines, type=Fragment] error:0(125) : error C1008: undefined variable “m_DiffuseMap”



Thanks in advance :slight_smile:

It seems you save the j3o with another version of jme3 than you load it with.