|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void Input_OnEnable() { |
|
|
|
#if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID)
|
|
|
|
Input.RawTouchEvent += ProcessRawTouch; |
|
|
|
#endif
|
|
|
|
UnityEngine.UIWidgets.InitUIWidgets.init(); |
|
|
|
UnityEngine.UIWidgets.RawTouchEvent += ProcessRawTouch; |
|
|
|
_inputMode = Input.mousePresent ? UIWidgetsInputMode.Mouse : UIWidgetsInputMode.Touch; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
Canceled = 4 |
|
|
|
} |
|
|
|
|
|
|
|
void ProcessRawTouch(Input.RawTouchEventParam param) { |
|
|
|
void ProcessRawTouch(UnityEngine.UIWidgets.RawTouchEventParam param) { |
|
|
|
var position = _getPointerPosition(new Vector2(param.x, param.y)); |
|
|
|
var pointerId = -1 - param.pointerId; |
|
|
|
switch ((TouchPhase)param.phase) { |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void Input_OnDisable() { |
|
|
|
#if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID)
|
|
|
|
Input.RawTouchEvent -= ProcessRawTouch; |
|
|
|
#endif
|
|
|
|
UnityEngine.UIWidgets.RawTouchEvent -= ProcessRawTouch; |
|
|
|
} |
|
|
|
|
|
|
|
void Input_Update() { |
|
|
|