Question by
Gianluca90 · Nov 18, 2016 at 05:02 PM ·
scripting problemmeshcanvas
Open canvas clicking on a mesh?
I want open a canvas when i click on a mesh. I made this script:
public GameObject menu;
private bool isShowing;
// Update is called once per frame
void Update()
{
if (InputManager.getInstance().checkForClick ())
{
isShowing = !isShowing;
menu.SetActive(isShowing);
}
}
What did i miss?
Comment
Answer by JeffHardddyyy · Nov 18, 2016 at 05:05 PM
I am not home so I can't give you right answer, but on Google go look up onGuiClick, I do know for sure that this is what you need.
I am answering it although I'm not home just so if you don't get a answer, you can at least get my answer.