Author Topic: Replace image in Atlas  (Read 4010 times)

ant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Replace image in Atlas
« on: April 17, 2012, 10:09:59 AM »
Hello,

Can i programmatically replace/add/remove an image within an Atlas? I'm requesting images from a server and would like to have them added to my main Atlas so to keep draw calls down, but ultimately keep transparency working as expected.

thanks,

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Replace image in Atlas
« Reply #1 on: April 17, 2012, 11:07:11 AM »
Not as it is now, no.

You can make individual Materials and show them with a UITexture, but you can't put them in an atlas at run time. Yet. ;)

loopyllama

  • Guest
Re: Replace image in Atlas
« Reply #2 on: April 17, 2012, 01:26:43 PM »
I remember there was a thread about this in the old forum. The old forum is still accessible, so it would be worth a look...If I find it I will post the link here for you...

ant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: Replace image in Atlas
« Reply #3 on: April 18, 2012, 09:48:39 AM »
It seems NGUI has no method to do this, the hack i came up with awhile ago was to write new pixels into the atlas texture myself (very slow)- i'll see if i can get this to work a lot faster. Thanks,