Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: ant on April 17, 2012, 10:09:59 AM

Title: Replace image in Atlas
Post by: ant 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,
Title: Re: Replace image in Atlas
Post by: Nicki 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. ;)
Title: Re: Replace image in Atlas
Post by: loopyllama 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...
Title: Re: Replace image in Atlas
Post by: ant 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,