...well, they boggle *my* mind, anyway - I'm sure there's a perfectly logical solution to my problem:
I have sprites where the original PSD files are 44px wide and 44px high. Since their dimensions might change in the future, I instantiate a temporary sprite at Awake() and use this to figure out its size at runtime:
Bounds tempSquareBounds = NGUIMath.CalculateAbsoluteWidgetBounds(tempSquare.transform);
SquareDimensions = tempSquareBounds.size.x;
(SquareDimensions has a setter that sets private variables squareWidth and squareHeight)
This correctly sets the width and height variables to 44px. Now, when I later instantiate these sprites, I use this:
GameObject currentSquare = Instantiate(BoardValuesRepo.BasicSquarePrefab, nextSquarePosition, new Quaternion(0, 0, 0, 0)) as GameObject;
currentSquare.transform.parent = BoardValuesRepo.boardReference.transform;
(I have a loop that increments nextSquareposition by the sprite size)
This lays the squares out neatly in rows and columns, just like I want. Except for one thing, and this is where my mind boggles: They're created at a ridiculously large scale. X is 10296, and so is Y.
I did a bit of calculation, and it turns out that 10296 divided by 44 is 234 - exactly half of what UIRoot sets the Manual Height field to when I keep Automatic checked. This leads me to suspect that the big instantiation scale is connected to what UIRoot is doing behind the scenes. I could be wrong, of course, I'm both a Unity newbie and NGUI newbie.
The game objects involved in this is structured like this:
UI Root
->Camera
-->Anchor
--->Panel
---->Sprite1
---->Sprite2
---->[etc]
Camera has Size 1 and Scale XYZ 1. Anchor also has Scale XYZ 1. And so does Panel. UIRoot gets a self-assigned Scale of 0.004273504.
Oh, and what I actually want is to have the sprites display at their original screen size, ie. 44px.
Anyone have any ideas?