hi guys
im making a game for android and now its button scripting time , but i dont know how write a code for buttons that arent gui , my buttons are simple gameobjects with box collider around ,
so i used onmousedown function for them , but sometimes during runtime buttons stop from working and then running again , is it because of my function or …
would anybody tell that how can write a touch script from input method of unity for gameobjects , not gui
thanks alot , and more
You can try casting a ray from the camera position.
The hit info that returns from the ray will tell you which object
or button you touched.