Skip to content

Instantly share code, notes, and snippets.

@eelstork
Created December 15, 2014 15:05
Show Gist options
  • Save eelstork/96526237babe6bf5fa6c to your computer and use it in GitHub Desktop.
Save eelstork/96526237babe6bf5fa6c to your computer and use it in GitHub Desktop.
Demonstrates how to write custom event handler for the event system in Unity 4.6
function OnPointerClick(event:UnityEngine.EventSystems.PointerEventData){
Debug.Log("pointer clicked: "+gameObject);
Debug.Log("Position: "+event.worldPosition);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment