so I’m working on a game in Unity and I was looking for a script that I could put on text that would make it so that when I click it, it changes to a new scene. I was also wondering if there was a way to make it so that when I mouse over the text, it glows
A GUI Button is an easy way of doing something like this.
function OnGUI(){
if(GUI.Button(Rect(Screen.width/2 - 50, Screen.height / 2 - 50, 100,50),"Click Me")){
//Switch scenes
Application.LoadLevel("YourSceneName");
}
}
You could try using a GUI Skin and tweaking the button hover settings to make the text glow when the mouse is over the button.
I’m really new to this, where do I put this script?
You can attach it to your camera or any other gameObject in the scene.
Thanks, I’ll give it a shot