Hello Guest

Author Topic: Text mesh on top of sprite on same GameObject?  (Read 4517 times)

gameslab

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
Text mesh on top of sprite on same GameObject?
« on: February 12, 2013, 02:38:21 pm »
Is it possible to add a Sprite component and a Text mesh component onto the same GameObject? I seem to get problems, because they seem to replace each other in the mesh filter, thus only one component is rendered, sprite or text.

If it is not possible, is the preferred way to use a GameObject with a Sprite and as a parent for a GameObject with a text mesh?

Thanks a lot

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Text mesh on top of sprite on same GameObject?
« Reply #1 on: February 12, 2013, 02:42:38 pm »
No its not possible. You should create one as a child of the other. Its up to you to decide how to parent it, it'll work either way :)
I tend to pick based on what I'm creating, if its a button with some text, I'll make the button sprite the parent as it "makes sense to me"