- Home /
Question by
HappyPants84 · Jul 11, 2018 at 10:45 AM ·
gameobjectbuttonbuttons
how to make a non ui button
I want to make a button for my first game but, I don't know how to make the button pressable. the button is not the text UI button but an actual button within the game world. any help would be appreciated thanks in advance.
Comment
Best Answer
Answer by JavierRuidoRosa · Jul 11, 2018 at 10:48 AM
You can add a script to the button and use OnMouseDown to register the press.
Yes, check the link I provided to see an example in the Unity Documentation ;)
thanks for the help, it worked perfectly.