Author Topic: Showing a sprite that doesn't belong to an atlas inside an NGUI panel  (Read 4156 times)

Nacho

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 12
    • View Profile
Hi! I'm working on a strategy game where, at some point, I need to display a sequence of very high-resolution renders and show each one of them on screen for a few seconds. The renders are displayed inside an NGUI panel. So far, I've managed to devise a solution that involves manually creating lots of NGUI texture atlas, fill them with a few of the aforementioned renders (as sprites) and just retrieve the appropriate one at runtime. It's working as expected, but the problem is that my game is going to feature hundreds of these renders and I'd like to find a solution that doesn't involve me manually setting up all the atlases.

My question is: is there any way to be able to render a sprite inside an NGUI panel without having to actually put that sprite inside an NGUI atlas first?

Thanks in advance for your help!

--Nacho

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Showing a sprite that doesn't belong to an atlas inside an NGUI panel
« Reply #1 on: October 16, 2012, 01:18:41 PM »
You might want to use a UITexture to display textures instead. Large textures that are going to be displayed briefly shouldn't take up atlas space.

Nacho

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: Showing a sprite that doesn't belong to an atlas inside an NGUI panel
« Reply #2 on: October 17, 2012, 11:54:29 AM »
Thank you for your prompt reply! I didn't notice that class, I'll give it a shot and come back if I have more questions.