Author Topic: Best way of swapping a texture / atlas?  (Read 2370 times)

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
Best way of swapping a texture / atlas?
« on: August 16, 2012, 01:59:27 AM »
I have a menu that will be simply a slideshow, using full screen images.

Up till now I have been creating my objects and everything by creating an atlas and then using them ingame.

But what I want to do is to be able to load a fullscreen image, free it and then load the next page.
Not sure how to do this yet in NGUI. Is it easily possible and if so, is it slow? Maybe I should load all my pages at once and then delete them after I have finished.

Am looking at UITexture at the moment.

If anybody has any tips. I would be most grateful :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Best way of swapping a texture / atlas?
« Reply #1 on: August 16, 2012, 10:09:07 AM »
Yup, UITexture. Set its texture to be your dynamically loaded texture, and when you don't need it anymore, destroy it and unload unused assets.

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
Re: Best way of swapping a texture / atlas?
« Reply #2 on: August 17, 2012, 02:29:47 AM »
Cheers ArenMook :)