Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: nah0y on August 24, 2012, 05:22:19 AM

Title: Share atlas between NGUI && ex2D ?
Post by: nah0y on August 24, 2012, 05:22:19 AM
Our game is made using ex2D and we're using NGUi for everything UI related... so now I have to figure out a way to share an atlas (or at least some sprites) between ex2D and NGUi, so I don't have to use twice the memory... do you have an idea with that ?
Title: Re: Share atlas between NGUI && ex2D ?
Post by: PhilipC on August 24, 2012, 09:20:03 AM
I've never used ex2D so i'm not sure what sort of functionality they provide. But NGUI is flexible enough that you should be able to use any texture that ex2D requires.

If ex2D creates its own atlas that you want to use you can set up a NGUI atlas manually (adding sprites and defining the area) or you can use a UITexture for the odd case by specifying the UV coords.
Title: Re: Share atlas between NGUI && ex2D ?
Post by: nah0y on August 24, 2012, 09:22:54 AM
Yes but specifying a NGUI atlas manually would mean that I would have two atlas using the same sprite.

But the method to use a UITexture and read the UV coords from ex2D atlas should be good, I just need to display an image from the ex2D atlas.
I think I'll try that ! Thanks :)