Skip to content

Instantly share code, notes, and snippets.

@timmeh4242
Created May 24, 2019 04:07
Show Gist options
  • Save timmeh4242/af2f571a0f5c71bacddd6bbead325097 to your computer and use it in GitHub Desktop.
Save timmeh4242/af2f571a0f5c71bacddd6bbead325097 to your computer and use it in GitHub Desktop.
using Unity.Entities;
public class ExampleClickSystem : ComponentSystem
{
protected override void OnUpdate()
{
Entities.ForEach((ref PointerEvent pointerEvent) =>
{
if (pointerEvent.EventType != PointerEventType.Click)
return;
var pointerEntity = pointerEvent.Entity;
UnityEngine.Debug.Log("CLICKED " + pointerEntity.Index)
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment