Hi
I am trying to get my game working across multiple resolutions. I have a script that detects resolution and swaps the texture atlases accordingly. What I'm struggling with now is Widget positioning.
I want to have a few identical copies of an image button, one above the other. When I switch resolutions, I want the relative distance between buttons to remain the same, as well as the distance between the bottom-most button and the bottom of the screen.
1) Am I correct in assuming that I can't use pixel offsets to do this, and instead need to use the relative offset feature?
My tree looks like this:
UI Root (Automatic Off, 768 height when I run as iPad, 640 when I run as iPhone 4)
-Camera
--Panel
---Anchor0
----ImageButton0
---Anchor1
----ImageButton1
---Anchor2
----ImageButton2
I use the relative offsets on the anchors to line the buttons up in the right spots on iPad. Runs fine. Then when I switch to iPhone 4, the positioning is off - everything is too low. Additionally, the box colliders on the buttons are too big (iPad size, it appears) and in the wrong positions.
2) Where am I going wrong in this setup?
The next step, something I had working before trying to get this scene going in multiple resolutions is that I want that Panel I mentioned in the tree to animate, to slide upwards from off-screen.
3) How can I do that if some of the children of that panel are anchors?
Thanks!