浏览代码

fix

/siyaoH-1.17-rawTouches
siyao 3 年前
当前提交
e6aa38bd
共有 2 个文件被更改,包括 31 次插入16 次删除
  1. 1
      com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs
  2. 46
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs

1
com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs


}
void Update() {
_wrapper.onEditorUpdate();
}

46
com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs


}
void Input_OnEnable() {
Input.touchRawProcess += ProcessRawTouch;
#if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID)
Input.RawTouchEvent += ProcessRawTouch;
#endif
public void ProcessRawTouch(Input.ProcessRawTouchesParam param) {
enum TouchPhase {
Began = 0,
Moved = 1,
Stationary = 2,
Ended = 3,
Canceled = 4
}
void ProcessRawTouch(Input.RawTouchEventParam param) {
switch (param.phase) {
case 0:
switch ((TouchPhase)param.phase) {
case TouchPhase.Began:
case 1:
case TouchPhase.Moved:
case 3:
case TouchPhase.Ended:
_wrapper.OnPointerUp(position, pointerId);
break;
default:

void Input_OnDisable() {
Input.touchRawProcess -= ProcessRawTouch;
#if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID)
Input.RawTouchEvent -= ProcessRawTouch;
#endif
}
void Input_Update() {

_isEntered = false;
_wrapper.OnPointerLeave();
}
#if UNITY_EDITOR || (!UNITY_IOS && !UNITY_ANDROID)
#if UNITY_EDITOR || (!UNITY_IOS && !UNITY_ANDROID)
#endif
#if UNITY_EDITOR || (!UNITY_IOS && !UNITY_ANDROID)
#endif
#if UNITY_EDITOR || (!UNITY_IOS && !UNITY_ANDROID)
#endif
}
#else
public void OnPointerDown(PointerEventData eventData) {
}
public void OnPointerUp(PointerEventData eventData) {
}
public void OnDrag(PointerEventData eventData) {
#endif
}
}
正在加载...
取消
保存