Hello, guys I’m having some problem with a script. I have this javascript code:
var GameName : String = "Game Name";
var GameType : int = 0;
var selStrings : String[] = ["Fighting", "Race", "MOBA", "FPS"];
function OnGUI(){
GameCreater();
FinishedWithGame();
GType();
}
function GameCreater() {
GameName = GUI.TextField (Rect (300, 135, 200, 20), GameName, 25);
}
function GType() {
GameType = GUI.SelectionGrid (Rect (325,175, 150, 100), GameType, selStrings, 2);
}
function FinishedWithGame(){
if(GUI.Button(Rect(385,350,50,20), "Finish")){
SaveGame();
}
}
function SaveGame(){
Debug.Log("Saving Game...");
PlayerPrefs.SetString("Game_Name", GameName);
}
And I have to make it responsive. I mean, when someone plays it in a 1280x1024 screen, it has to be centered as if it was in a 1024x728 monitor. Can you guys help me please?
Thanks.