I'm creating a component that lets you write text, like the UI Text component, but using sprites as letters.
I already have the mapping for characters->sprites, and now was going to draw the text using the sprites.
My first idea, was to just create one children for each letter, each child having a sprite renderer.
But it feels like a pretty poor approach, since a transform and a sprite renderer component have to created or destroyed, when the text changes size.
Then I thought about using a Mesh renderer and mesh filter, and define the mesh when the text changes, creating a quad for each letter. But what I don't like about this idea is having 2 extra components in my gameObject, as I would like to keep it as clean as possible.
Is there a way to achieve this keeping all the necessary components inside my own class? Defining my own quads, UVs and such is just fine, but I just don't know how to render them through script. Is it even possible without adding more components to the gameObject?
Don't know if its relevant, but I want to use World Coordinates, not screen coordinates.