Hello,
When I build my game, and select the lowest resolution, the scene decreases in size (which is okay) but the GUIs don't they all stay the exactly the same size as a high res game would?
Why?
Hello,
When I build my game, and select the lowest resolution, the scene decreases in size (which is okay) but the GUIs don't they all stay the exactly the same size as a high res game would?
Why?
You've got to use a GUISkin and something like this:
// Set up gui skin
GUI.skin = guiSkin;
// Our GUI is laid out for a 1920 x 1200 pixel display (16:10 aspect). The next line makes sure it rescales nicely to other resolutions.
GUI.matrix = Matrix4x4.TRS (Vector3(0, 0, 0), Quaternion.identity, Vector3 (Screen.height / nativeVerticalResolution, Screen.height / nativeVerticalResolution, 1));
//destruction counter placement
DrawLabelBottomRightAligned( destructionCounterOffset, CollisionScript.playerPoints.ToString ( "Destruction: " + CollisionScript.playerPoints) );
}
//for damage count e ext
function DrawLabelBottomRightAligned (pos : Vector2, text : String)
{
GUI.Label(Rect (pos.x, nativeVerticalResolution - pos.y, 1200, 120), text);
}