In my assets folder, I have "enemytest.png" and "enemytest.pack" files. You have to pass around the Assets object around. One way of doing this is the way Andreas Ohelke does it in Learning libGDX Development where a Assets class load the TextureAtlas and then simple. This means that you let the AssetManager load the TextureAtlas and you manage getting the regions out of it yourself. I kept trying using other loaders as well but it didn't go well.I could not find any resources so I need help :( someTexture (Assets.someTexture) atlas (Assets.uiAtlas) skin (Assets.uiSkin) The same rules apply for looking up regions in your atlas, best is to do this a single time for each region in your atlas. You don't, the asset is the TextureAtlas, not the individual TextureRegions. TexturePacker.process(tpSettings, args0, args1, args2) When loading the asset with AssetManager Note there is no option to set and params here. I am keep getting theĬom.: Assets not loaded: enemytest.pack I can't find a way to load TextureAtlas (.pack) via AssetManager. It will store a number of references an asset has and keep it loaded until it is no longer required. So I decided to use assetloader to minimize the lag but the problem is An Asset Manager in LibGDX is a class that is used to load and unload resources for your project. The game got really laggy as I had to call each region of the TextureAtlas for frames to be used in animation (libgdx stated that using findregion for TextureAtlas is SLOW=lag). I originally implemented loading TextureAtlas directly from the asset folder but
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |