Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to make a 3d object do something when clicked on

 using UnityEngine;
 using System.Collections;
 
 public class OnMouseDownExample : MonoBehaviour 
 {
     void OnMouseDown()
     {
         print (name);    
     }
 }
 
PREVIOUS NEXT
Tagged: #object #clicked
ADD COMMENT
Topic
Name
3+5 =