Texture not showing


I put my objects in the scene as follows:

[java] Spatial object = assetManager.loadModel(objectPath);
Material material = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
material.setTexture(“ColorMap”, assetManager.loadTexture(texturePath));

When I do this is a new project, everything is shown fine:

Though when I do the same in a larger project (not mine, but I have to work on it), I get:

Mind, there is toonshading active so that’s why there are black lines.

I have no clue why the walls and floor are not filled in with the texture (though it works with the same code, model and texture in a new project). When I use another texture (which is not related to the object), the floor and walls do get filled in.

I wonder how this can happen and what I have to look for in order to change this.