Author Topic: Make the sprite dinamically?  (Read 4632 times)

RonaldJolly

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Make the sprite dinamically?
« on: July 10, 2017, 06:41:44 AM »
Anyone here can help me with an example of how to make a sprite dynamically?

I really appreciate all your answers. Cheers!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Make the sprite dinamically?
« Reply #1 on: July 15, 2017, 06:10:21 AM »
Make a sprite dynamically? Do you mean AddComponent<UISprite>()? If you mean adding a sprite to an atlas, don't do it. Just use a UITexture at run-time. I mean, it's certainly doable and the code for the UIAtlasMaker is there in that file, but it's just not worth it.