Assume I want to develop following friends functionality. My battle plan is following:
- Put a plane that will contain all the friend items.
- Put scrollrect on it.
- Create the prototype of a friend object that will serve as a original to copy for every friend.
- Take the list of all friends this player has.
foreach()
for every friend andInstantiate()
a new object adding more and more margin from top the top, and thus rendering say 10 friends and corresponding GUI buttons with consistent spacing.
Upon update/adding/removing:
- Force redrawal of each individual item and redraw all items based on list of friends.
Is this the way to go, or am I reinventing a wheel?
How do you manage a list of items that need to be visually displayed en-masse, can change, by user or by any other event?