Libgdx阅读外部资源

时间:2014-01-31 20:08:17

标签: android libgdx

在桌面应用程序中,我可以加载这样的纹理

Texture texture = new Texture(Gdx.files.absolute("C:/picture.png"));

我怎么能在android中做到这一点?

1 个答案:

答案 0 :(得分:0)

外部与您的SD卡相关。所以这个:

Texture texture = new Texture(Gdx.files.external("picture.png"));

将查看SD卡的根目录。