HI,
I used the FPS Tutorial to create a game.
Now i got some serious problems with the GUI.
I designed some Icons for health, rocket ammo and mg ammo and used this for a texture in GUITexture objects.
The problem is, if i change the screen resolution the health bars (and the other too) stay at the same position. So if you use a smaller resolution the GUI dissapears.
I solved the problem for the large boxes with the onGUI function (example below)
var healthGUI : Texture;
function OnGUI () {
GUI.DrawTexture(Rect(0,Screen.height - 128, 256, 128), healthGUI);
}
, but the small bars who show ammo and health couldn’t be placed this way because they get scaled inside the FPS script. The textgui’s have the same problem.
So, this is what i want:
How can i place the bars on a position where they move up/down/left/right when i change the screen resolution?
or
How can I configure the build options that there is only 1 resolution avaiable if you want to play the game. (Then I could arrange the bars with fixed values.)
As an Attachment theres the FPS script, which I modified.
And a Screenshot to show you how my GUI looks.
The small bars and text GUIs are not on their correct position at the moment, obviously.
I think you can imagine where they should be.
278501–9981–$fpsplayer_957.js (3.98 KB)