Author Topic: Share atlas between NGUI && ex2D ?  (Read 2685 times)

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Share atlas between NGUI && ex2D ?
« 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 ?

PhilipC

  • Guest
Re: Share atlas between NGUI && ex2D ?
« Reply #1 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.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Share atlas between NGUI && ex2D ?
« Reply #2 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 :)