2D Toolkit Forum

2D Toolkit => Support => Topic started by: TeamSpace on November 05, 2013, 03:14:00 pm

Title: change the sprite collection of a text mesh
Post by: TeamSpace on November 05, 2013, 03:14:00 pm
I am trying to figure out how to change the sprite collection and font of a text mesh, with no luck. I see you can set the font, but I don't see any way to get a font out of a sprite collection.
Title: Re: change the sprite collection of a text mesh
Post by: unikronsoftware on November 05, 2013, 10:48:03 pm
You can't change the sprite collection of a font? The font simply hooks into the atlas in a sprite collection, the font data object itself has references to the bits it needs. There is no index of fonts in a collection. You simply need to get the reference to the new font, assign it to textMesh.font and Commit().
Title: Re: change the sprite collection of a text mesh
Post by: TeamSpace on November 06, 2013, 12:42:06 pm
Okay I thought that would be the case, thanks.