TUTORIAL:
U need to have a database and a user with every right. And I called my table userTB with the following collums:

Sorry for german words in it…
----------------- CREATE STANDARD USER ---------------
So then create as I said a standard user with
name = test
password = 5f4dcc3b5aa765d61d8327deb882cf99 (md5() code for “password”)
img = link of any image u want (not too big)
sex = 2
genre = action
birth = somthing like 30.01.1978
First of all what we will use is $_GET Vars in php:
-------------------- DATABASE CONNECTOR ------------
So let’s create folder called mysql_inc_32
In this you have to create a script called connect.php
<?php
function connection(){
$verbindung = mysql_connect("localhost", "yourusername" , "yourpassword") or die("Couldn't connect to database!");
$con = mysql_select_db("Database_name") or die ("Wrong database");
return $con;
}
?>
And easy script just for having the connection to your database but still the most important one! So make sure
this script is right because otherwise nothing will work!
-------- PHP GET VARIABLES EXPLINATION ------------
So let’s come to the next script in your main folder which is called process.php!
This script will be used for getting information about the user that is typed in in the $_GET vars…
You don’t know how to use this?
It’s quite easy. Get Variables are variables that are displayed in the url of the script for example this url has one:
www.blaaa.com/script.php**?name=max&id=123**
Then what we would have are two variables seperated by a ‘?’ and listed with ‘’. You can get them by using this code:
php** **s = $_GET['name']; echo($s);** **
then in this case it would be printed ‘max’.
So enaugh of background knowledge!
The script of process.php will start with including the connection script we created before and connect with this to our
databse:
```php
**<?php
include(“mysql_inc_32/connect.php”);
$con = connection();
?>**
** **Then we'll load everything from our database and get them:** **php
**<?php
include(“mysql_inc_32/connect.php”);
$con = connection();
s_1 = "SELECT * FROM userTB WHERE username = '" . _GET[‘username’] . “’ AND passwort = '” . md5($_GET[‘passwort’]) . “'”;
$sql = mysql_query($s_1);
if(mysql_num_rows($sql) > 0){
while ($ds = mysql_fetch_object($sql)) {
$img = $ds → img;
$birth = $ds → birthday;
$sex = $ds → geschlecht;
$genre = $ds → genre;
}
}
?>**
** **So let's explain this: `if(mysql_num_rows($sql) > 0){`** **With this we test whether there are any results for the username AND the pw. ... If there is a result get every var. ...** **So let's try out if there is an error with this:** **add this at the end for testing:** **php
echo($img . “<br” . $birth . "
" . $genre);
** **And now type in: "www.yourwebsite.com/process.php?username=test&passwort=password** **There should be written now some infos of him...** __**So now delete this line again (echo($img . "<br" . $birth . "**__ __**" . $genre); )**__ **so now we'll add another GET variable called info.. So that u type in what you want to know of the user** **you type in.. Because later we will only be able to read one line...** **so it should look like this:** **php
**<?php
include(“mysql_inc_32/connect.php”);
$con = connection();
s_1 = "SELECT * FROM userTB WHERE username = '" . _GET[‘username’] . “’ AND passwort = '” . md5($_GET[‘passwort’]) . “'”;
$sql = mysql_query($s_1);
if(mysql_num_rows($sql) > 0){
while ($ds = mysql_fetch_object($sql)) {
$img = $ds → img;
$birth = $ds → birthday;
$sex = $ds → geschlecht;
$genre = ds -> genre;
}
if(_GET[‘info’] == “img”) {
echo($img);
}else if($_GET['info'] == "birth"){
echo($birth);
}else if($_GET['info'] == "sex"){
echo($sex);
}else if($_GET['info'] == "genre"){
echo($genre);
}else{
echo("true");
}
}else{
echo(“Passwort oder username falsch”);
}
?>**
** **------------------------- CREATE NEW USER --------------** **So in this part we'll create a script a new script for registring... For this we'll need the variabled called username and pw** **In our unity script the user has to type in the password two times for savety:** **So first of all include your connection:** **php
**<?php
include(“mysql_inc_32/connect.php”);
$con = connection();
?>**
** **Then check whether some user came to this site by accident by checking whether the username variable exists or not:** **php
**<?php
include(“mysql_inc_32/connect.php”);
con = connection(); if(isset(_GET[‘username’]) and isset($_GET[‘pw’])){
}
?>**
** **If this site has these variables load the table for the users and check whether the name already exists or not:** **php
**<?php
include(“mysql_inc_32/connect.php”);
con = connection();
if(isset(_GET[‘username’]) and isset($_GET[‘pw’])){
s_1 = "SELECT * FROM userTB WHERE username = '" . _GET[‘username’] . “'”;
$sql = mysql_query($s_1);
if(mysql_num_rows($sql) > 0){
echo(“username already in use”);
}
}
?>**
** **If this doesn't exist write a new character with the username and the md5 crypted password into the 'userTB':** **php
**<?php
include(“mysql_inc_32/connect.php”);
con = connection();
if(isset(_GET[‘username’]) and isset($_GET[‘pw’])){
s_1 = "SELECT * FROM userTB WHERE username = '" . _GET[‘username’] . “'”;
$sql = mysql_query($s_1);
if(mysql_num_rows($sql) > 0){
echo(“username schon vergeben”);
}else{
s_2 = "INSERT INTO userTB (username, passwort) VALUES ('" . _GET[‘username’] . “', '” . md5($_GET[‘pw’]) . “')”;
$sql_2 = mysql_query($s_2);
}
}
?>**
** **Then check if it was a success or not and add a message for the stupid user who came to this site by accident:** **php
**<?php
include(“mysql_inc_32/connect.php”);
con = connection();
if(isset(_GET[‘username’]) and isset($_GET[‘pw’])){
s_1 = "SELECT * FROM userTB WHERE username = '" . _GET[‘username’] . “'”;
$sql = mysql_query($s_1);
if(mysql_num_rows($sql) > 0){
echo(“username schon vergeben”);
}else{
s_2 = "INSERT INTO userTB (username, passwort) VALUES ('" . _GET[‘username’] . “', '” . md5($_GET[‘pw’]) . “')”;
$sql_2 = mysql_query($s_2);
if($sql_2 == true){
echo(“Successfully registered!”);
}else{
echo(“Error while registrating… Try again please”);
}
}
}else{ echo(“Username und Passwort empty”);}
?>**
** **-------------------JAVASCRIPT ACTION! ------------------** **So now let's go to the funny part :smile:** **So first of all we'll need a few variables for doing our script:** **Read all this carefully...** **
#pragma strict
var s :String; //<---- This will show the errors
var username :String; //<---- The username u typed in
var pw :String; //<---- The password you typed in
var pw2 :String; //If your at the register form this is your repeated password
var info:String; //<— I actually don’t know why I used this variable at the moment
var success :boolean; //if your login was a success
var skin:GUISkin; //<— Well the GUISkin you want to use
var LogoStyle :GUIStyle; //<-- This is the style u want to use for your logo
var DescribtionStyle :GUIStyle; //The style you want the describtion of the fields and the info message to look like
var obj :GameObject[]; //your gameobjects for the position of the buttons (We’ll use this for iTween)
var login :boolean; // if true → login form - if false → the registerform is activated
** **Now you will see there's the variable obj :GameObject[ ]; ! I created my code with the help of iTween** **So if you don't want this then just leave it away (But I can tell u, the whole change of the var login** **will work with iTween)** **So let's go to our design:** **The start function contains every start position of the objects of the obj var:** **
**function Start () {
obj = new GameObject[11];
obj[0] = new GameObject(); // LOGO
obj[0].transform.position.x = Screen.width / 2 - 165;
obj[0].transform.position.y = Screen.height / 2 - 198;
obj[1] = new GameObject(); //Username describtion
obj[1].transform.position.x = Screen.width / 2 - 165;
obj[1].transform.position.y = Screen.height / 2 - 96;
obj[2] = new GameObject(); //Username text_field
obj[2].transform.position.x = Screen.width / 2 - 165;
obj[2].transform.position.y = Screen.height / 2 - 77;
obj[3] = new GameObject(); //password describtion
obj[3].transform.position.x = Screen.width / 2 - 165;
obj[3].transform.position.y = Screen.height / 2 + 5;
obj[4] = new GameObject(); //password field
obj[4].transform.position.x = Screen.width / 2 - 165;
obj[4].transform.position.y = Screen.height / 2 + 26;
obj[5] = new GameObject(); //login button
obj[5].transform.position.x = Screen.width / 2 - 165;
obj[5].transform.position.y = Screen.height / 2 + 100;
obj[6] = new GameObject(); //password 2 field
obj[6].transform.position.x = Screen.width / 2 - 165;
obj[6].transform.position.y = -600;
obj[7] = new GameObject(); //password 2 text
obj[7].transform.position.x = Screen.width + 20;
obj[7].transform.position.y = Screen.height / 2 + 109;
obj[8] = new GameObject(); //Info text
obj[8].transform.position.x = Screen.width / 2 - 165;
obj[8].transform.position.y = Screen.height / 2 + 173;
obj[9] = new GameObject(); //registrier button
obj[9].transform.position.x = Screen.width / 2 + 10;
obj[9].transform.position.y = Screen.height / 2 + 100;
obj[10] = new GameObject(); //Login Button
obj[10].transform.position.x = Screen.width / 2 + 10;
obj[10].transform.position.y = Screen.height / 2 + 100;
}**
** **Then let's add the animation of the login boolean change:** **
function Update(){
if(login){
iTween.MoveTo(obj[5], iTween.Hash(“x”, Screen.width / 2 + 10, “y”, Screen.height / 2 + 100)); //Button
iTween.MoveTo(obj[6], iTween.Hash(“y”, -600)); //pw2f
iTween.MoveTo(obj[7], iTween.Hash(“x”, Screen.width + 20));//pw2d
iTween.MoveTo(obj[8], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 173));
iTween.MoveTo(obj[9], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 100)); //registrier Button
iTween.MoveTo(obj[10], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height + 100)); //login Button
}else{
iTween.MoveTo(obj[5], iTween.Hash(“x”, Screen.width / 2 + 16, “y”, Screen.height / 2 + 187)); //Button
iTween.MoveTo(obj[6], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 131));
iTween.MoveTo(obj[7], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 109));
iTween.MoveTo(obj[8], iTween.Hash(“x”, Screen.width / 2 - 245, “y”, Screen.height / 2 + 240));
iTween.MoveTo(obj[9], iTween.Hash(“x”, -400, “y”, Screen.height / 2 + 100)); //registrier Button
iTween.MoveTo(obj[10], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 187)); //login Button
}
}
** **Now let's come to the rest of our update function:** **
if(s == “true”){
success = true;
}
if(success){
PlayerPrefs.SetString(“username”, username);
PlayerPrefs.SetString(“passwort”, pw);
Application.LoadLevel(“MainPage”);
}else{
PlayerPrefs.DeleteKey(“username”);
PlayerPrefs.DeleteKey(“password”);
}
** **With this u make sure that you now that the user is logged in in the other scenes too (PlayerPrefs.SetString(); );** **So together it should look like this:** **
**#pragma strict
var s :String;
var username :String;
var pw :String;
var pw2 :String;
var info:String;
var success :boolean;
var skin:GUISkin;
var LogoStyle :GUIStyle;
var DescribtionStyle :GUIStyle;
var obj :GameObject;
var login :boolean;
function Update(){
if(s == “true”){
success = true;
}
if(success){
PlayerPrefs.SetString(“username”, username);
PlayerPrefs.SetString(“passwort”, pw);
Application.LoadLevel(“MainPage”);
}else{
PlayerPrefs.DeleteKey(“username”);
PlayerPrefs.DeleteKey(“passwort”);
}
if(login){
iTween.MoveTo(obj[5], iTween.Hash(“x”, Screen.width / 2 + 10, “y”, Screen.height / 2 + 100)); //Button
iTween.MoveTo(obj[6], iTween.Hash(“y”, -600)); //pw2f
iTween.MoveTo(obj[7], iTween.Hash(“x”, Screen.width + 20));//pw2d
iTween.MoveTo(obj[8], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 173));
iTween.MoveTo(obj[9], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 100)); //registrier Button
iTween.MoveTo(obj[10], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height + 100)); //login Button
}else{
iTween.MoveTo(obj[5], iTween.Hash(“x”, Screen.width / 2 + 16, “y”, Screen.height / 2 + 187)); //Button
iTween.MoveTo(obj[6], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 131));
iTween.MoveTo(obj[7], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 109));
iTween.MoveTo(obj[8], iTween.Hash(“x”, Screen.width / 2 - 245, “y”, Screen.height / 2 + 240));
iTween.MoveTo(obj[9], iTween.Hash(“x”, -400, “y”, Screen.height / 2 + 100)); //registrier Button
iTween.MoveTo(obj[10], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 187)); //login Button
}
}
function Start () {
obj = new GameObject[11];
obj[0] = new GameObject(); // LOGO
obj[0].transform.position.x = Screen.width / 2 - 165;
obj[0].transform.position.y = Screen.height / 2 - 198;
obj[1] = new GameObject(); //Username describtion
obj[1].transform.position.x = Screen.width / 2 - 165;
obj[1].transform.position.y = Screen.height / 2 - 96;
obj[2] = new GameObject(); //Username text_field
obj[2].transform.position.x = Screen.width / 2 - 165;
obj[2].transform.position.y = Screen.height / 2 - 77;
obj[3] = new GameObject(); //password describtion
obj[3].transform.position.x = Screen.width / 2 - 165;
obj[3].transform.position.y = Screen.height / 2 + 5;
obj[4] = new GameObject(); //password field
obj[4].transform.position.x = Screen.width / 2 - 165;
obj[4].transform.position.y = Screen.height / 2 + 26;
obj[5] = new GameObject(); //login button
obj[5].transform.position.x = Screen.width / 2 - 165;
obj[5].transform.position.y = Screen.height / 2 + 100;
obj[6] = new GameObject(); //password 2 field
obj[6].transform.position.x = Screen.width / 2 - 165;
obj[6].transform.position.y = -600;
obj[7] = new GameObject(); //password 2 text
obj[7].transform.position.x = Screen.width + 20;
obj[7].transform.position.y = Screen.height / 2 + 109;
obj[8] = new GameObject(); //Info text
obj[8].transform.position.x = Screen.width / 2 - 165;
obj[8].transform.position.y = Screen.height / 2 + 173;
obj[9] = new GameObject(); //registrier button
obj[9].transform.position.x = Screen.width / 2 + 10;
obj[9].transform.position.y = Screen.height / 2 + 100;
obj[10] = new GameObject(); //Login Button
obj[10].transform.position.x = Screen.width / 2 + 10;
obj[10].transform.position.y = Screen.height / 2 + 100;
}**
** **Now what is needed is the OnGUI() function: In this the whole direct action of the user will be seen:** **
**function OnGUI () {
GUI.skin = skin;
username = GUI.TextField(Rect(obj[2].transform.position.x, obj[2].transform.position.y, 348, 48), username, 25);
pw = GUI.PasswordField(Rect(obj[4].transform.position.x, obj[4].transform.position.y, 348, 48), pw , “*”[0], 25);
pw2 = GUI.PasswordField(Rect(obj[6].transform.position.x, obj[6].transform.position.y, 348, 48), pw2 , “*”[0], 25);
GUI.Label(Rect(obj[0].transform.position.x, obj[0].transform.position.y,Screen.width , Screen.width), “Loginnation”, LogoStyle);
GUI.Label(Rect(obj[1].transform.position.x, obj[1].transform.position.y, Screen.width, Screen.width), “Username:”, DescribtionStyle);
GUI.Label(Rect(obj[3].transform.position.x, obj[3].transform.position.y, Screen.width, Screen.width), “Password:”, DescribtionStyle);
GUI.Label(Rect(obj[7].transform.position.x, obj[7].transform.position.y, Screen.width, Screen.width), “Repeat password:”, DescribtionStyle);
if(GUI.Button(Rect(obj[5].transform.position.x, obj[5].transform.position.y, 166, 39),“Enter”)){
if(login){
getting(“process.php?username=”+username+“&passwort=”+pw+“&info=success”);
username = “”;
pw = “”;
pw2 = “”;
}else{
write(username, pw, pw2);
}
}
if(GUI.Button(Rect(obj[9].transform.position.x, obj[9].transform.position.y, 166, 39),“New”)){
login = false;
}
if(GUI.Button(Rect(obj[10].transform.position.x, obj[10].transform.position.y, 166, 39),“Login”)){
login = true;
}
if(s != “true”){
GUI.Label(Rect(obj[8].transform.position.x, obj[8].transform.position.y, Screen.width, Screen.width), s, DescribtionStyle);
}else{
GUI.Label(Rect(obj[8].transform.position.x, obj[8].transform.position.y, Screen.width, Screen.width), “Successfully Logged in”, DescribtionStyle);
}
}**
** **So the first few lines are only used for the forms but then u see I used a method called getting() and write(). You can see them here:** **
**function getting(extension :String){
var url :String = “http://www.yoururl.com/” + extension; //<------- !!!IMPORTANT!!! CHANGE THIS TO YOUR URL!!!
var www : WWW = new WWW (url);
yield www;
s = www.text;
}
function write(uname :String, pw :String, pw2 :String){
if(pw == pw2){
if(uname.Contains(“^”) || uname.Contains(“°”) || uname.Contains(“'”) || uname.Contains(“§”) || uname.Contains(“") || uname.Contains("%") || uname.Contains("") || uname.Contains("/") || uname.Contains("=") || uname.Contains("?") || uname.Contains("*") || uname.Contains("~") || uname.Contains("@")){
s = "Username isn't formal right";
}else{
if(uname.Length > 6){
if(pw.Length > 6){
var www : WWW = new WWW ("http://www.yoururl.com/write_new.php?username="+username+"&pw="+pw); //<------- !!!IMPORTANT!!! CHANGE THIS TO YOUR URL!!!!
yield www;
s = www.text;
}else s="Password is too short (min. 7 Chars)";
}else s="Username is too short (min. 7 Chars)";
}
}else{
s = "Passwords do not match";
}
}**
**```**
**So now let's get this together:**
**```**
**#pragma strict
var s :String;
var username :String;
var pw :String;
var pw2 :String;
//var info:String;
var success :boolean;
var skin:GUISkin;
var LogoStyle :GUIStyle;
var DescribtionStyle :GUIStyle;
var obj :GameObject[];
var login :boolean;
function getting(extension :String){
var url :String = "http://www.yoururl.com/" + extension;
var www : WWW = new WWW (url);
yield www;
s = www.text;
}
function write(uname :String, pw :String, pw2 :String){
if(pw == pw2){
if(uname.Contains("^") || uname.Contains("°") || uname.Contains("'") || uname.Contains("§") || uname.Contains("”) || uname.Contains(“%”) || uname.Contains(“”) || uname.Contains(“/”) || uname.Contains(“=”) || uname.Contains(“?”) || uname.Contains(“*”) || uname.Contains(“~”) || uname.Contains(“@”)){
s = “Username isn’t formal right”;
}else{
if(uname.Length > 6){
if(pw.Length > 6){
var www : WWW = new WWW (“http://www.yoururl.com/write_new.php?username=“+username+”&pw=”+pw);
yield www;
s = www.text;
}else s=“Password is too short (min. 7 Chars)”;
}else s=“Username is too short (min. 7 Chars)”;
}
}else{
s = “Passwords do not match”;
}
}
function OnGUI () {
GUI.skin = skin;
username = GUI.TextField(Rect(obj[2].transform.position.x, obj[2].transform.position.y, 348, 48), username, 25);
pw = GUI.PasswordField(Rect(obj[4].transform.position.x, obj[4].transform.position.y, 348, 48), pw , “*”[0], 25);
pw2 = GUI.PasswordField(Rect(obj[6].transform.position.x, obj[6].transform.position.y, 348, 48), pw2 , “*”[0], 25);
GUI.Label(Rect(obj[0].transform.position.x, obj[0].transform.position.y,Screen.width , Screen.width), “Loginnation”, LogoStyle);
GUI.Label(Rect(obj[1].transform.position.x, obj[1].transform.position.y, Screen.width, Screen.width), “Username:”, DescribtionStyle);
GUI.Label(Rect(obj[3].transform.position.x, obj[3].transform.position.y, Screen.width, Screen.width), “Password:”, DescribtionStyle);
GUI.Label(Rect(obj[7].transform.position.x, obj[7].transform.position.y, Screen.width, Screen.width), “Repeat password:”, DescribtionStyle);
if(GUI.Button(Rect(obj[5].transform.position.x, obj[5].transform.position.y, 166, 39),“Enter”)){
if(login){
getting(“process.php?username=”+username+“&passwort=”+pw+“&info=success”);
username = “”;
pw = “”;
pw2 = “”;
}else{
write(username, pw, pw2);
}
}
if(GUI.Button(Rect(obj[9].transform.position.x, obj[9].transform.position.y, 166, 39),“New”)){
login = false;
}
if(GUI.Button(Rect(obj[10].transform.position.x, obj[10].transform.position.y, 166, 39),“Login”)){
login = true;
}
if(s != “true”){
GUI.Label(Rect(obj[8].transform.position.x, obj[8].transform.position.y, Screen.width, Screen.width), s, DescribtionStyle);
}else{
GUI.Label(Rect(obj[8].transform.position.x, obj[8].transform.position.y, Screen.width, Screen.width), “Successfully Logged in”, DescribtionStyle);
}
}
function Update(){
if(s == “true”){
success = true;
}
if(success){
PlayerPrefs.SetString(“username”, username);
PlayerPrefs.SetString(“passwort”, pw);
Application.LoadLevel(“MainPage”);
}else{
PlayerPrefs.DeleteKey(“username”);
PlayerPrefs.DeleteKey(“passwort”);
}
if(login){
iTween.MoveTo(obj[5], iTween.Hash(“x”, Screen.width / 2 + 10, “y”, Screen.height / 2 + 100)); //Button
iTween.MoveTo(obj[6], iTween.Hash(“y”, -600)); //pw2f
iTween.MoveTo(obj[7], iTween.Hash(“x”, Screen.width + 20));//pw2d
iTween.MoveTo(obj[8], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 173));
iTween.MoveTo(obj[9], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 100)); //register Button
iTween.MoveTo(obj[10], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height + 100)); //login Button
}else{
iTween.MoveTo(obj[5], iTween.Hash(“x”, Screen.width / 2 + 16, “y”, Screen.height / 2 + 187)); //Button
iTween.MoveTo(obj[6], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 131));
iTween.MoveTo(obj[7], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 109));
iTween.MoveTo(obj[8], iTween.Hash(“x”, Screen.width / 2 - 245, “y”, Screen.height / 2 + 240));
iTween.MoveTo(obj[9], iTween.Hash(“x”, -400, “y”, Screen.height / 2 + 100)); //registrier Button
iTween.MoveTo(obj[10], iTween.Hash(“x”, Screen.width / 2 - 165, “y”, Screen.height / 2 + 187)); //login Button
}
}
function Start () {
obj = new GameObject[11];
obj[0] = new GameObject(); // LOGO
obj[0].transform.position.x = Screen.width / 2 - 165;
obj[0].transform.position.y = Screen.height / 2 - 198;
obj[1] = new GameObject(); //Username describtion
obj[1].transform.position.x = Screen.width / 2 - 165;
obj[1].transform.position.y = Screen.height / 2 - 96;
obj[2] = new GameObject(); //Username text_field
obj[2].transform.position.x = Screen.width / 2 - 165;
obj[2].transform.position.y = Screen.height / 2 - 77;
obj[3] = new GameObject(); //password describtion
obj[3].transform.position.x = Screen.width / 2 - 165;
obj[3].transform.position.y = Screen.height / 2 + 5;
obj[4] = new GameObject(); //password field
obj[4].transform.position.x = Screen.width / 2 - 165;
obj[4].transform.position.y = Screen.height / 2 + 26;
obj[5] = new GameObject(); //login button
obj[5].transform.position.x = Screen.width / 2 - 165;
obj[5].transform.position.y = Screen.height / 2 + 100;
obj[6] = new GameObject(); //password 2 field
obj[6].transform.position.x = Screen.width / 2 - 165;
obj[6].transform.position.y = -600;
obj[7] = new GameObject(); //password 2 text
obj[7].transform.position.x = Screen.width + 20;
obj[7].transform.position.y = Screen.height / 2 + 109;
obj[8] = new GameObject(); //Info text
obj[8].transform.position.x = Screen.width / 2 - 165;
obj[8].transform.position.y = Screen.height / 2 + 173;
obj[9] = new GameObject(); //registrier button
obj[9].transform.position.x = Screen.width / 2 + 10;
obj[9].transform.position.y = Screen.height / 2 + 100;
obj[10] = new GameObject(); //Login Button
obj[10].transform.position.x = Screen.width / 2 + 10;
obj[10].transform.position.y = Screen.height / 2 + 100;
}**
```
QUESTIONS?