0

I'm currently reading myself into the scene2d.ui component of libGDX and I noticed something I can't quite explain. According to the documentation the skin looks for a texture region with the same name (without file ending) in the provided texture atlas and if it doesn't find any it it looks for a file with that name. The image filename in the fnt file is currently called default.png and while there is no image file with that name, there is an atlas region called default.
To get a better understanding of how things work together, I decided to change the names. I changed the image file name in the .fnt file to default2.png and changed the atlas region name to default2. In theory it should still work. However when I now start my application is says it can't find default2.png.

Could somebody maybe explain what I did wrong or what I overlooked?

The_Blog
  • 155
  • 1
  • 12

1 Answers1

0

Looks like I didn't read the documentation carefull enough. I changed the image file name inside the .fnt file, but that one isn't important. What is important is that the name of the .fnt file provided in the skins file has to be the same as the atlas region name. The image file name inside the .fnt file doesn't matter.

The_Blog
  • 155
  • 1
  • 12