ID:724604
 
Well I been learning from a book and I became stuck on this code.(This is using Javascript in Unity btw)

function Start(){

menuAreaNormalised = Rect(menuArea.x * Screen.width -(menuArea.x * 0.5),menuArea.y * Screen.height -(menuArea.y * 0.5),menuArea.width,menuArea.height);

}


Now menuAreaNormalised and menuArea are both Rect type variables. This code with some other code is able to achieve the result of this.

Link to the pic = http://files.byondhome.com/Djdovis/Untitled3

Anyways menuArea has the X value of 0.1 and the Y value of 0 . So this box should be positioned in the corner of the screen. I use this for positioning a label.

GUI.Label(Rect(gameLogo), gameLogoTexture);


gameLogo is a Rect type variable with the Y value of 0. So shouldnt the label be touching the very top of the screen? I am sorta confused about this code. Could somebody explain it to me?

Go to http://answers.unity3d.com/index.html

that's their help forum.
I tried that but nobdody answered so I hoped that at least 1 developer from Byond knew Javascript and could help me here.