Author Topic: Dynamically Add Sprite in ScrollView  (Read 1645 times)

dendenny01

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 4
    • View Profile
Dynamically Add Sprite in ScrollView
« on: July 02, 2014, 05:39:55 AM »
How can I add Sprite/Button in the scrollview dynamically the number of sprites to be added depends upon number of elements present in the array and the label of the button/sprite is the string in the array present for that particular sprite/button

Any type of help will be appreciated

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Dynamically Add Sprite in ScrollView
« Reply #1 on: July 02, 2014, 06:02:23 AM »
Same as any other dynamic instantiation. Ideally using NGUITools.AddChild(parent, prefab). Instantiate as many as you need.