Make Something Clickable in Unity 3D

Making a GameObject clickable in Unity 3D is a piece of cake! Just write an OnMouseDown function in a script, and stick it to your GameObject. Voila – instant interactivity!

// Unity javascript
function OnMouseDown()
    // Do something

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.