TextureRegion在LibGDX中加载整个TextureAtlas

TextureRegion在LibGDX中加载整个TextureAtlas,libgdx,Libgdx,我正在尝试从我的TextureAtlas加载TextureRegion。但是,它正在加载整个TextureAtlas,而不仅仅是子图像 问题与类似,但我没有调用sprite.getTexture(),但我遇到了同样的问题 TextureAtlas atlas; oceanTextureRegion; atlas = new TextureAtlas(Gdx.files.internal("atlas.txt")); oceanTextureRegion = atlas.findRe

我正在尝试从我的TextureAtlas加载TextureRegion。但是,它正在加载整个TextureAtlas,而不仅仅是子图像

问题与类似,但我没有调用sprite.getTexture(),但我遇到了同样的问题

TextureAtlas atlas;     
oceanTextureRegion; 

atlas = new TextureAtlas(Gdx.files.internal("atlas.txt"));
oceanTextureRegion = atlas.findRegion("ocean");
在渲染方法中

batch.draw(oceanTextureRegion, 0, 0);

显然,您在atlas.txtpack文件中有错误的区域uv比例和位置,或者您将
oceanTextureRegion
uv位置更改为更大的值,请注意,如果您更改区域的uv位置,则它会占用图像的其他部分。

您可以显示
atlas.txt
的内容吗?