I was using TornadoTwins Script but cutted out some parts.
This is the script.
var isQuitButton = false;
function OnMouseUp()
{
if( isQuitButton )
{
Application.Quit();
}
else
{
Application.LoadLevel(1);
}
}
I used a font and a BoxCollider.
Exit And Start Dont work.
Output doesnt gives an Error. The problem could be the Font to.
I have no idea.
Waths the problem?
And how do i fix it?
Thanks!
you should use the print() method to see whats not working…
simply type the line:
print(“Clicked”);
at the start of the function and play the game to see if the function is being called when you click the text.
if not, it will show you whats not working.
from what i see in here, i dont think thers any problem with the code.
It doesnt prints annything.
have you checked the console? it supposed to print in there.
if it is not printing anything when you click on it, there are some prooblems you might want to check:
- double check if the same object you attached the script has a box collider and a trigger OFF.
- make sure you did attached the script to the object O_O
- make sure that in the editor, the “isQuitButton” is off. because its not going to acctually quit the game through the editor.
by the way, i would use OnMouseDown instead of OnMouseUp.
Still not working! D:
Onoez! Maybe there’s a problem with my font?
i dont think its a font related problem…
do you see a green outline? when you click on the font object?