OnMouseDown not working in Windows Phone
Unity is not letting me build my project for windows phone because of a problem with function OnMouseDown, I tried to look for the solution but I didnt find anything useful, not even in Unity Documentation, I think the solution is Input.simulateMouseWithTouches but I am not sure how to put it in the code. Thanks for help.
$$anonymous$$ind posting your code? It might be something to do with that.
Answer by MistyAcid · Aug 04, 2016 at 11:57 PM
Depending on your code or what you want to do, you could always use:
if (Input.GetMouseButton(0))
{...}
It will run the code inside the ... area when the mouse button is clicked and/or held.
Your answer
![](https://koobas.hobune.stream/wayback/20220612090200im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
when OnMouseDown() is on the right timing, it triggers an event. How to achieve it? 2 Answers
Object appear and disappear Code 2 Answers
why OnMouseDown is not working 0 Answers
Editor.log vs build size 100+ sharedassets 0 Answers
[SOLVED] My build system wont work and I need help with it! 0 Answers