Author Topic: IMAGE GALLERY WITH NGUI  (Read 4607 times)

pedrovan

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
IMAGE GALLERY WITH NGUI
« on: November 12, 2014, 10:16:38 AM »
Hi there,

i´m really new with Unity and NGUI, and i´m trying, with no much sucess, to do an Image Gallery with NGUI, just like the scrolls examples, on wich i would have the multiple images in the bottom as Sprites, and the centered sprite would be displayed bigger on top centered on the panel background. And as the scrolls roll, the bigger image on top changes also.
I´m guessing for many images it would be better to use it all in the same Atlas right?

Is it possible to have also a text for each independent image, that also changes when i scroll?....as a Label i guess?

Can i also have multiple NGUI´s (image Galleries) in my game, that can be access, by the same comand, but they would be diferent, depending on the position where my player is in the terrain? ( first person game so my player is actually my camera)
Maybe by proximity of a game object on the scene?



I feel a bit stupid asking this newby questions, but any help would be much apreciated.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: IMAGE GALLERY WITH NGUI
« Reply #1 on: November 14, 2014, 04:28:22 AM »
Create a prefab out of what a single item in your gallery supposed to look like, then instantiate it multiple times using NGUITools.AddChild to populate your content. Change the values of each instance -- sprites, text etc as needed.