Hello,
I am new to scripting, so sorry for the unexpierences questions :), i am working on a menu at the moment, but i cant seem to get the input for the mouse right. You start at a intro screen and there u can press any key to continue, it works fine, but when i add the codes to add also the mouseclicks there, nothing works anymore. What am i doing wrong?
The idea is: If you are at the intro screen, you need to click any key, i stretched a button all over. This is working fine with any key. So i havent put the layers wrong, Then the canvas where all the materials are in, and it should go to the main canvas with background which is the menu. IntroWindow = the canvas, it should be disabled on click of key or mouse.
This one is not working:
public void IntroQuit()
{
if (Input.anyKeyDown
|| (Input.GetMouseButtonDown(0)
|| (Input.GetMouseButtonDown(1)
|| (Input.GetMouseButtonDown(2))
IntroWindow.enabled = false;
}
This one does work:
public void IntroQuit()
{
if (Input.anyKeyDown)
IntroWindow.enabled = false;
}