Created
May 24, 2019 04:07
-
-
Save timmeh4242/af2f571a0f5c71bacddd6bbead325097 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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