Hi.
First of all, I’m new with Unity.
I have a problem with GUI, sometimes appears but, in other projects, doesn’t.
I used a code in a Tutorial for draw a Crosshair in the middle of screen, the code is:
var position : Rect;
var crosshairTexture : Texture2D;
function Start() {
position = Rect((Screen.width - crosshairTexture.width)/2, (Screen.height - crosshairTexture.height)/2, crosshairTexture.width, crosshairTexture.height);
}
function onGUI() {
GUI.DrawTexture(position, crosshairTexture);
}
I was doing other projects myself but, before I make my first game with Unity I wanted read some Tutorials and documentation. I was doing the FPS tutorial and when a I write the code the GUI Crosshair doesn’t appears in screen. I attachs that script on a Empty GameObject called GUI.
I’m doing something bad? (GUI.Label doesn’t appears too)