Ok, so to elaborate a bit more on the Cell itself (the UIWidget/UIDragScroll/BoxCollider/UICenterOnClick object).
The labels and buttons inside need to be positioned at runtime (regardless of screen resolution) as they are positioned originally.
What I have found (by trial and error... and a LOT of trial and error) is that all items inside the Cell object should have each of their anchors set to the empty UIWidget Container just under the Cell object itself. This UIWidget container has its anchor set to the Cell object and Left/Right/Bottom/Top is equal to 0 so that it covers the whole Cell.
All of the objects below the UIWidget container (the Labels and Sprites that are actually inside the button objects) are all anchored to this object. If they are set to their immediate parents (i.e. the button object itself) their positions and sizes are all over the place.
I have also found (through trial and a lot of error) is that depending on the position of the object on the screen, the anchors for left/right/bottom/top are different. Meaning, if an object (and its children) are on the LEFT side of the screen, the anchors look like:
- LEFT=LEFT
- RIGHT=CENTER
- BOTTOM=SET AT CURRENT POSITION
- TOP= SET AT CURRENT POSITION
If they are in the CENTER of the screen:
- LEFT=CENTER
- RIGHT=CENTER
- BOTTOM=SET AT CURRENT POSITION
- TOP= SET AT CURRENT POSITION
And if they are on the RIGHT of the screen:
- LEFT=CENTER
- RIGHT=RIGHT
- BOTTOM=SET AT CURRENT POSITION
- TOP= SET AT CURRENT POSITION
Now, I'm going into a lot of detail here because although this "seems" to work, I think I am just getting lucky on these settings. Their positions don't really match exactly where they need to be but this is the best combination I could get working. There are a lot of moving parts here and... to be honest I'm not confident I am doing it correctly.
Thanks!
PAR
Here is my setup:
UIRoot
- UIScrollView
- - UIGrid
- - - UIDragScroll/BoxCollider/UICenterOnClick/UIWidget (what I am calling a Cell)
- - - - UIWidget (container)
(anchor set to Cell parent)- - - - - UILabel
(anchor set to UIWidget parent)- - - - - UIButton/BoxCollider/UIWidget
(anchor set to UIWidget parent)- - - - - - Animation
- - - - - - - UILabel
(anchor set to UIWidget grand parent)- - - - - - - UISprite
(anchor set to UIWidget grand parent)