I'm using a 2D UI which has the Scaling Style set to "FixedSize" (and "FixedSizeOnMobiles" for well, Mobile devices). The Manual Height is set to 800px and the minimum/maximum height values don't seem to do anything.
What I'm trying to do:
I'm trying to programatically create a level select screen (an example of which can be found here:
http://i.imgur.com/JaZtwnE.png ). The idea behind creating the layout programatically is to handle different width screens as the game is played in landscape mode. As part of programatically laying out the level select screen, I need to know how big the icons are on the screen (in pixels, after scaling) to see how many of them I could fit on the screen (ie: numIcons = Mathf.Floor(scaledIconWidth/Screen.Width);
The problem:
Any attempts at getting the size of the UISprite seem to give me the wrong number. I've tried all of the variations inside of NGUIMath such as CalculateRelativeWidgetBounds, CalculateAbsoluteWidgetBounds, CalculateReltativeInnerBounds, etc. Each of them gives me a different number, but none of them are the correct number. They seem to give me the numbers related to the sprite but before it actually gets scaled down by UI Root's FixedSize.
Is there a function, or some math that I can use to get the size of the UISprite's on-screen size after scaling, in pixels?