- Home /
Need help with onMouseDown ()
Working in 2D, C#
So i was having issues with onMouseDown not firing in my project, I figured it was something else in the project preventing it. Then i started a new project with a fresh new sprite and script and still nothing. After looking at different ways online i can't find anything.
My sprite has a 2D collider, on the top of the Hierarchy. Tried Is Trigger (and not Trigger) and with and without a RigidBody.
I'm pretty sure this is all i need right?:
void onMouseDown () {
Debug.Log ("working");
}
Any help would be greatly appreciated, Im just flat out baffled. It's probably something tiny I've missed but it's made me to a halt...
Thanks!
Answer by ScaniX · Aug 18, 2016 at 02:23 PM
void onMouseDown()
should be
void OnMouseDown()
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Script won't destroy prefab clones... 1 Answer