@Override
    public void write(JmeExporter ex) throws IOException {
        super.write(ex);
        OutputCapsule oc = ex.getCapsule(this);
        oc.write(colorSpace, "colorSpace", null);
        // For backwards compatibility
        oc.write(0, "texture_unit", -1);
        oc.write((Texture) value, "texture", null);
    }
Set to {@link ColorSpace#Linear} if the texture color space has to be forced
to linear instead of sRGB.

@param colorSpace the desired color space
jme3-core/src/main/java/com/jme3/material/MatParamTexture.java