Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: nah0y on August 06, 2012, 07:23:03 AM
-
Could you explain briefly what's the difference between using a UIGrid and a UITable ?
And in what case should we use one instead of the other ?
Thanks !
-
At the top of each of those classes we have a summary of what it does.
UIGrid "All children added to the game object with this script will be repositioned to be on a grid of specified dimensions."
UITable "All children added to the game object with this script will be arranged into a table with rows and columns automatically adjusting their size to fit their content"
So UIGrid will just arrange the items into formation. UITable will resize the elements.
-
Thanks for the answer,
I've never, ever seen any example where the UITable resize elements. I mean, I don't understand how they will be resized since there is the MakePixelPerfect that would make them their correct size.
-
UITable changes "cell size" to the dimensions of the widgets within. Grid stays at fixed size. Check the quest example to see how one cell's size change affects others -- by effectively moving them.
-
Thanks for explanation :) , UITable will be useful for dynamic content.
-
Yup, your last explanation is really more clear than the ones in the docs.
I'll stay with : "UITable changes "cell size" to the dimensions of the widgets within. Grid stays at fixed size"
:-)