Room list that works for NGUI
Options
Comments
-
This is more of a question for the NGUI forums.
"Given a dynamic list of strings how do I create corresponding list of buttons"
I would recommend:
- create a variable RoomList
- create a variable prevRoomList
The for every room list update:
1) RoomList = PhotonNetwork.GetRoomList()
3) Create buttons that are in RoomList but aren't in prevRoomList.
3) Destroy buttons that are in the prevRoomList but aren't in RoomList .
4) prevRoomList = RoomList
As far as arranging the buttons goes, I remember NGUI offers a grid script that will organize child transforms as well as a scroll-able panel.0