// Use this for initialization void Start() { SGPushStartedEvent.RegisterListener(OnSGPushStarted); SGPushChangedEvent.RegisterListener(OnSGPushChanged); SGPushEndedEvent.RegisterListener(OnSGPushEnded); SGPushCanceledEvent.RegisterListener(OnSGPushCanceled); }
void OnDestroy() { SGPushStartedEvent.UnregisterListener(OnSGPushStarted); SGPushChangedEvent.UnregisterListener(OnSGPushChanged); SGPushEndedEvent.UnregisterListener(OnSGPushEnded); SGPushCanceledEvent.UnregisterListener(OnSGPushCanceled); }
void OnSGPushChanged(SGPushChangedEvent gesture) { Debug.Log($"<Color=yellow>{gesture.Description}</Color>"); }