- Home /
creating a main menu
hello everyone!... Im trying to make a main menu with gui textures.What Ive done so far is basicaly add one main gui texture(which is the background) and other textures for each button I want to use in the main menu.I also used a script to change the look of each button when rolling over, but I have 2 problems: first:when I roll over one button, some of them change their look at the same time. second: Im not sure how to add a different link to each one of them separately. I need some help!!.. thanks a lot! This is the script that im using to change the look of the button when rolling over:
var normalTex : Texture2D; var hoverTex : Texture2D;
function OnMouseEnter(){ guiTexture.texture = hoverTex; }
function OnMouseExit(){ guiTexture.texture = normalTex; }
Please post the whole script that you'r using, and use the code tag(?)!
Answer by peginet · Nov 10, 2013 at 11:18 AM
try this is script :
var NormalTex : Texture2D;
var EnterTex : Texture2D;
function OnMouseEnter()
{
guiTexture.texture = EnterTex;
}
function OnMouseExit()
{
guiTexture.texture = NormalTex;
}
function OnMouseDown(){
Application.LoadLevel(your level);
}
Your answer
Follow this Question
Related Questions
Changing two different objects renderer colour 1 Answer
GameObject duplicates every time my GUI button is pressed 1 Answer
Get Mouse Position GUI 3 Answers
Player Fast Travels 1 Answer
Cube Counter 1 Answer