I am working on a menu and i cant seem to be able to get a texture to appear once i hit the objectives button.
Is texture right because what i am trying to do display a PNG image which i made in fireworks
Thanks in advance.
var newSkin : GUISkin;
var logoTexture : Texture2D;
var aTexture : Texture;
function OnGUI() {
//load GUI skin
GUI.skin = newSkin;
//layout start
GUI.BeginGroup(Rect(25, 25, 1200, 500));
//the menu background box
GUI.Box(Rect(0, 0, 1200, 500), "");
//logo picture
GUI.Label(Rect(25, 25, 300, 68), logoTexture);
if(GUI.Button(Rect(55, 100, 180, 40), "Play Game")) {
Application.LoadLevel("Level 1");
}
//View Objectives button (level 0)
if(GUI.Button(Rect(55, 150, 180, 40), "Objectives")) {
//GUI.Text(Rect(150, 150, 180, 40), "Objectivessssssssssssssssssssssssss");
GUI.DrawTexture(Rect(10,10,300,300), aTexture, ScaleMode.ScaleToFit, true, 10.0f);
//Application.LoadLevel(0);
}
//View Controls button
if(GUI.Button(Rect(55, 200, 180, 40), "Controls")) {
//Application.Quit();
}
//About the game button
if(GUI.Button(Rect(55, 250, 180, 40), "About")) {
//Application.Quit();
}
//quit button
if(GUI.Button(Rect(55, 300, 180, 40), "Quit Game")) {
Application.Quit();
}
//layout end
GUI.EndGroup();
}