Hello Guest

Author Topic: change the sprite collection of a text mesh  (Read 3516 times)

TeamSpace

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
change the sprite collection of a text mesh
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: change the sprite collection of a text mesh
« Reply #1 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().

TeamSpace

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: change the sprite collection of a text mesh
« Reply #2 on: November 06, 2013, 12:42:06 pm »
Okay I thought that would be the case, thanks.