I'm trying to convert from Texts to Sprite Fonts for performance reasons, and I'm a bit stuck on the differences in how they behave.
I have a card Sprite, which had seven Texts associated with it (name, stats, etc). I had all of these in a container so that I could easily manage them as a unit.
However, when using a Sprite Font, the entire font texture appears to be loaded for every individual object. So if I have seven different Sprite Fonts in the container, that's seven copies of the font texture taking up resources. Which is no good.
The seemingly obvious answer would be to use multiple instances of a single Sprite Font object. But I can't figure out how to make that work properly with containers. If I only have the one Sprite Font object in the container, how will it know which seven instances in particular to select/destroy in association with the rest of the container?
Thanks!