I've been struggling with this for most of the week now so was hoping someone would be able to help out.
In my project I'm trying to centre a grid made up of single actors and have it remain in the centre for all resolutions/devices. I've created a simple project to show the problem. This project has only one actor but the principle is the same. The individual square size in the grid is based on screen size / 10. That way I'm always going to have 10 squares high visible on the screen. This works, and if you switch between the different devices/resolutions you'll see that working. After I've calculated the size of the square I'm creating the scene size to be square size * 20 and then adding the height of the device to the scene height and the width of the device to the scene width.
I'm then calculating the difference between the scene size and the grid size and halving that difference to get an offset. That offset is then used to centre the grid. On the original scene device (iPad) it works fine. But as soon as you switch to another device like iPhone 6 the border around the grid is different on all sides. I should mention that I know that I could just centre this one actor with self.Position.X = scene.Size.Width / 2 etc. but as I've mentioned my main project grid is made up off lots of actors.
In the main project I'm using the universal build formula by Lovejoy but still not having much luck. Nothing wrong with his formula I just can't find the right place to implement it. I've tried adding/subtracting it to the scene size, as well as trying adding/subtracting it to the offset etc. His formula is in the example I've attached to this post.
I was hoping to find one block of code that works for all resolution sizes instead of having to write individual rules for all devices.
Thanks in advance
P.S. by the way you can pan around the scene by dragging/swiping. And when viewing all devices in the viewer please choose Overscan to see what I mean