This commit is contained in:
siyao 2021-11-22 10:42:36 +08:00
Родитель 76123f4d3e
Коммит 40d6676460
2 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -438,9 +438,8 @@ namespace Unity.UIWidgets.engine {
}
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;
}
@ -452,7 +451,7 @@ namespace Unity.UIWidgets.engine {
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) {
@ -472,9 +471,7 @@ namespace Unity.UIWidgets.engine {
}
void Input_OnDisable() {
#if !UNITY_EDITOR && (UNITY_IOS || UNITY_ANDROID)
Input.RawTouchEvent -= ProcessRawTouch;
#endif
UnityEngine.UIWidgets.RawTouchEvent -= ProcessRawTouch;
}
void Input_Update() {

Просмотреть файл

@ -5,5 +5,6 @@
"unity": "2019.4",
"description": "UIWidgets allows you to build beautiful cross-platform apps through Unity",
"dependencies": {
"com.unity.modules.uiwidgets": "1.0.0"
}
}